RadMultiSelect add a selection on load.

1 Answer 200 Views
Ajax
Jay
Top achievements
Rank 1
Jay asked on 13 Sep 2021, 08:56 PM

Something like what I have done with DropDownLists for an eternity:

if (RadMultiSelect1.Items.FindChildByValue("value") != null)
{
            RadMultiSelect1.Items.FindChildByValue("value").Selected = true;
}

Just looking to auto add the logged in user as already selected on page_load.

The above doesn't seem to work.

And as usual, I did dig through the documentation and DuckDuckGo it.

 

 

 

 

1 Answer, 1 is accepted

Sort by
0
Vessy
Telerik team
answered on 15 Sep 2021, 11:36 AM

Hello Jay,

In order to select an item, you should add its Value to the .Value property of the MultiSelect. Keep in mind that the .Value property is of type array of objects and not a simple string:

Regards,
Vessy
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
Ajax
Asked by
Jay
Top achievements
Rank 1
Answers by
Vessy
Telerik team
Share this question
or