Limit the Number of Items in Connected Listboxes
|Product||Progress Kendo UI ListBox|
I have two connected ListBoxes:
- The first one lists the available items.
- The second one lists the selected items, whose number is limited to five.
How can I disable the addition of new items to the second ListBox while at the same time the second box remains active for the user to reorder the items based on their priority sequence.
- Create custom logic to determine if an item can be added to the selected list.
- Apply the custom logic on the
addevent of the ListBox by using the
viewmethod of its dataSource. As a result, the approach adds and respectively removes the item from the first list only if the conditions are met.
For the complete implementation of the approach, refer to this runnable example.