Last Updated: 11 Jun 2020 06:30 by ADMIN
Created on: 09 Jun 2020 09:52
Category: MultiSelect
Type: Feature Request
Support for programatically adding and removing from Multiselect


Recently we were building a feature that allows the optional selection of multiple items, and decided to use the Telerik Multiselect component. A subcomponent of the feature reads from a file, and pre-selects items in the multiselect based on data in the file similarly to this sample:

foreach(string item in file)

At the moment, however, it seems that the Telerik Multiselect does not refresh its state when selected items are added and removed programatically, only when they are added or removed via user interaction. Would it be possible to have the Telerik Multiselect support the usage of ObservableCollection?

Thanks in advance!



1 comment
Svetoslav Dimitrov
Posted on: 11 Jun 2020 06:30


You can programmatically preselect items for our Multiselect as you can see from the example here: The condition for that to be true is that the items you want to pre-select must be in the data source bound to the Data parameter. If they are not, you should add them and after that - select them. As with any other parameter that is not a value type, you must provide a new reference for the framework to update the component.

Svetoslav Dimitrov
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.