This is a migrated thread and some comments may be shown as answers.

Adding Selected Values by Code

1 Answer 48 Views
MultiColumnComboBox
This is a migrated thread and some comments may be shown as answers.
Brian
Top achievements
Rank 1
Brian asked on 04 Jan 2021, 03:37 PM

Hi,

I have populated the MultiColumnComboBox DropDown Items using a DataTable

I would like to preselect the SelectedItems onload, so that they are hilited in the DropDown Box, and the corresponding Display-values are shown in the select textbox.

Adding DataRows to the SelectedItems property seams to do the trick for the DropDown List, but the values are not shown in the select textbox.

How do I trigger the select textbox to be filled (with multible values)? 

/Brian

 

 

 

 

1 Answer, 1 is accepted

Sort by
0
Vladimir Stoyanov
Telerik team
answered on 07 Jan 2021, 09:14 AM

Hello Brian,

Thank you for the provided information. 

Please, allow me to start by saying that it is recommended to bind to the DefaultView of the DataTable when using a table for the ItemsSource of a control. You can find an example in the following article: Binding to the DataView of a DataTable (note, that it is for the RadGridView, however the same approach can be used with the RadMultiColumnComboBox).

I am attaching a sample project, which demonstrates how you can preselect some items when the control is loaded. Can you check it out and let me know, if the demonstrated approach is suitable for your scenario?

Regards,
Vladimir Stoyanov
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
MultiColumnComboBox
Asked by
Brian
Top achievements
Rank 1
Answers by
Vladimir Stoyanov
Telerik team
Share this question
or