I am using a comboBox and for some reason the automaticall triger for the dropdown menu to appear when you have some results is not working. Is there any way to trigger this dynamically. Maybe onChange event?
I am using dojo 1.6!
A code example would be nice so as we can recommend alternatives or better solutions, but in the case that all you want to do is open a dropdown programmatically, you should find openDropDown() and toggleDropDown() functions on the combobox object. If you have the dojo source you can find more dropdown related functions in dijit/_HasDropDown.js, which combo box inherits from.
Related
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);
I wanted to bind a checkboxlist using KendoUI when a modal pop is opened.
On modal popup load I wanted to get data from a webapi which will have json response and bind it to checkbox kendo Ui template.
I referred kendoUI forums all samples are using static data. Can someone please guide me to the right direction where I can consume dynamic data.
Thank you!
There's a lot of ways to approach this.
I think the easiest way would be to use a TreeView with checkboxes configured that only returns a single level of nodes, then just show it in a Window or Dialog as you would show any other view. This way you get decent, default item formatting of the TreeView with having to use a template, but you don't get paging if your datasource is large.
You can also use a ListView with a template that formats the data with a checkbox. This requires a template but you get paging capability. Once again, you just display the ListView in a Window or Dialog as normal.
Here's a simple demo of a ListView implementation: http://dojo.telerik.com/#Stephen/iwOhIV
It is a combination of Kendo demos: http://demos.telerik.com/kendo-ui/dialog/treeview-integration with the TreeView replaced with the ListView from this demo(http://demos.telerik.com/kendo-ui/listview/remote-data-binding) and then the styling tweak with a template that uses checkboxes.
The rest of it is up to you(persisting/loading checked state, etc).
I wish to create dynamic dropdown, meaning the value of the second dropdown changes with the change in selection on the first. I was looking through the Dojo docs and it seems there are 3 different widgets that I can use,
dijit/form/ComboBox
dojox/form/DropDownSelect
dijit.form.Select
Now I am confused as to which one should i use for creating Dynamic DropDowns?
You can choose anyone depending upon what extra features you want. While dijit.form.Select is your normal HTML select, combobox and filteringselect offer more features.
Follow http://kennethfranqueiro.com/2010/06/combobox-vs-filteringselect/ for a comparison between the two. You can also play with them to know how they work.
I had used FilteringSelect in my app for the same behavior as need.
Differences between dojo dropdown :
Select It is simple combobox like select in HTML with no validation
and not provide any search facility inside select options.
ComboBox It is pure form of combobox and name as ComboBox again it
will not provide any default validation but it provide search
facility within its options.
FilteringSelect It is an advance form of select have default
facility of validation and search facility. And it also has property
to take value as input tag take value in HTML.
In dojo you can also try custom validation which is provided inside dojox library. I hope it will help you.
Is there a way in JQ-Grid to display an icon for each row which will open a drop down menu with a list of actions/links?
Thanks
There are no standard implementation of the behavior. You can implement what you need with respect of the custom formatter.
You can try to use formatter:'actions' as alternative way. In the answer I shows how to extend standard actions buttons with custom buttons. In another answer (see the demo) I shows one more way how to implement very close behavior as formatter:'actions' do but with respect on another events.
I'm currently using jqGrid and ASP.Net MVC. With my current project, my goal is to provide a grid of data to the end user, and they can then edit this. The data is machine-generated, and the users will be confirming if the machine is correct or not.
I think ideally for speed, I'd like to provide a row per item, with a radio button group as the editable. The users could then pick from the values 'Unknown', 'Correct', 'Incorrect'.
As there will be a lot of data, I'd also like to provide a control of some type that can set all rows in the grid to one of the available radio button choices, for the user experience.
Given that there seems to be no native support for this in jqGrid, I wanted to ask if anyone has had any experience writing something like this, and whether this is achievable and reliable, or whether I should stick with the drop-down editable approach that is native to jqGrid.
To implement radio button as the editable instead of the standard drop-down editable approach you can use so named custom editing feature of jqGrid (see http://www.trirand.com/jqgridwiki/doku.php?id=wiki:common_rules#custom). This allows you to create any custom control to edit the cell value. An example of the implementation you can find here: Add multiple input elements in a custom edit type field.
To set all rows in the grid to one of the available radio button choices you can use either a control outside of jqGrid or add an additional custom button in the navigation bar (see http://www.trirand.com/jqgridwiki/doku.php?id=wiki:custom_buttons). If you search for navButtonAdd you will find a lot of examples how to implement this, for example, Jqgrid: navigation based on the selected row. Because you use server based data, you can just call a method on the server to make the changes which you need and then call trigger("reloadGrid") to refresh jqGrid data.