Is there a way to display "All" for Kendo drop down list when a user come to the page with this drop down list - kendo-ui

I want to configure OS Version dropdown list to display "All", so when the user first comes to this Page he should see "All" in the Dropdown for "OS Version". It seems that Kendo dropdown list does not have space holder feature, so I wonder is there any other way to make this works?
enter image description here

You should configure its optionLabel property.
See: http://docs.telerik.com/kendo-ui/api/javascript/ui/dropdownlist#configuration-optionLabel

Related

Rails: disable input tag upon selection from a dropdown menu

Scenario/Context
I've got a drop down menu with two input elements underneath.
From the dropdown menu, are names of companies (with values set to the respective company id's), and another prompt to Add a new company.
If the option to Add a new company is selected from the dropdown, then the user is to fill out the 2 input field elements (i.e. company name and company email).
Otherwise, if an available company is selected from the dropdown,
then the 2 input fields (for company name and email are to be disabled).
My question
Is this possible to do without an AJAX call if I want things to happen without a page refresh?
Can anyone suggest some other alternatives??
Many thanks!
That is absolutely possible, though you'd need to use some JavaScript to make it happen and load a bit more data to the DOM on the initial page load.
For each option in your company select dropdown, add a data attribute for the name and email.
Then, watch that dropdown for the change event in JavaScript. Whenever that event is fired, if the data-company-name and data-company-email attributes are defined for the selected option, disable the input fields and populate them with those values. If those data attributes are not defined for the option (likely only for your 'Add a new company' option), then clear the values from the input fields and enable them.

Custom drop-down as an item in a kendo tree

I am trying to create an item that is a button "show more" and when you press on it you can show a kind of context menu / drop down that all of the items in that drop down are with checkboxes and there is a search component in it too, so you can search some items in the dropdown by their name. For example: (instead of "c++,c#,Object c" it's should show "show more", i.e. static text)
I tried to use kendoContextMenu. But I don't know if it's could work because the problem with context menu is that when I will click on a checkbox the menu will close. Please advise me of a way to do that or if you have an example of code. Thanks!
The MultiSelect component might be a good starting point
https://docs.telerik.com/kendo-ui/api/javascript/ui/multiselect.
My understanding is that MultiSelect does not have a "select more than one at a time in dropdown" feature.
You might consider using a pop up window and within that implement your own custom ui that features everything you want
search term box
scrolling list of selected and selectable items
accept or cancel changes in selection
Regarding your dojo that extends drop down list, I can't code the extension for you. However, changing the dataSource assignment to a setDataSource call will populate the extension component according to the template.
// kendo.ui.DropDownList.fn.dataSource = options.testItemSource;
me.setDataSource(options.testItemSource);

Add record with ID, selecting NAME from another table

Can anyone, please, help me with Libreoffice Base form creation?
I have the following tables:
And I'm trying to add a form to enter new RESOURCES record with the following fields: [RESOURCE_NAME], [CURRENCY_NAME] and [AMOUNT]. But after 10+ tries I have not succeeded. I have tried adding it via wizard, selecting RESOURCES as main form and CURRENCIES as subform and vice versa. I have tried VIEWS and forms based on them. These tries only gave to me or no possibility to enter new record, either creation of the new CURRENCY.
I don't need to create new currency via this form, I only want to enter new Resource (only enter once, not to modify, not to delete). Since I don't want to remember all the ID's I want to select currency name via DropDown list.
Can anyone provide instructions about how to do it, please?
Thanks.
You do not need a subform for this - just create your form document with RESOURCES as the main form (only form).
You will need a listbox to enter the currency item. A listbox has two fields, a display field and a field that is saved in the table. You will set it up to display CURRENCY_NAME and store CURRENCY_ID.
When you create a listbox, the wizard that pops up may get you what you want. If the wizard falls short:
Make sure the form document is open in design mode: on the "Form Controls" toolbar, the leftmost/topmost icon of a pencil with a triangle should be depressed. If this icon is grayed out, close your document, right-click on its name and choose "Edit".
Right-click on the listbox and choose "Control"; this will open the properties window
On the tab "Data" change the "Type of list contents" to "Sql"
In the field "List content" enter SELECT "CURRENCY_NAME", "CURRENCY_ID" FROM "CURRENCIES" ORDER BY "CURRENCY_NAME"
The Bound Field should default to 1. If it isn't 1, change it to 1.
Close the properties window and save your form. It should work as you want now.
If you want a listbox inside a tablegrid: after you create the table, with the form in edit mode, right-click on the column name you want to change and choose "Replace with" and then "listbox".
Edited to include comment by OP about bound field needing to be 1

<rich:select> does not show all items in search mode

I am using rich:select component in my xhtml page
My requirements are :
1) rich:select should be searchable.
2) But should show all elements in the list when clicking the down arrow, irrespective of the search string present.
For making component searchable, I set enableManualInput=true. But,when I search and select some value, and later click on the down arrow (the dropdown expand) it does not show all items in the Dropdown list, but shows only the item currently selected. What happens is, the value of the currently selected item is set as the search prefix.
I need to manually remove all characters on the search field and start searching again.
Is there a workaround for this? Where I want a dropdown of list and also should be able to search through the list. If this component does not support this functionality, is there another alternative component?
I use richfaces 4 and JSF 2.0
Thanks.
You can have the value deleted each time the list is shown (i.e. when you click the input field or the button):
<rich:select id="select" value="#{bean.selectValue}" enableManualInput="true"
onlistshow="#{rich:component('select')}.setValue('')">
It is a bug in RichFaces:
https://issues.jboss.org/browse/RF-11088
It is planned to be fixed in 4.5.0, meanwhile you can take a fix from the pull request:
https://github.com/richfaces4/components/commit/79657a54c90e99bfa1fb5f42eab8bf6f29fc9091

How to display checkbox with values in filter menu

I am adding columns dynamically in the kendo ui grid. I have added property filterable as true. When I click the filter icon, it opens the default context menu.
What I want is on click of filter icon, I want to display checkbox along with value.
How can I do this.
Thanks
Try setting filterable to true & columnMenu to false.
Perhaps this link from the official telerik documentation can help: Checkbox filter menu filtering The main idea is to use the filterMenuInit event to insert custom templates for every column needed.

Resources