Custom drop-down as an item in a kendo tree

1.1k Views Asked by At

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)

enter image description here

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!

1

There are 1 best solutions below

3
On

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);