We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

How to initial check items

I have a ListBox like this:

            <ejs-listbox id="Schnellnavigation" ejs-for="SelectedValues" allowDragAndDrop="true" dataSource="Model.Items">
                <e-listbox-selectionsettings  mode="Multiple" showCheckbox="true" checkboxPosition="Right"></e-listbox-selectionsettings>
            </ejs-listbox>


Motel.Items is a List of Items with a text and a value property.
SelectedValues  = new List<string>() { "1", "2" };

When i load the page the checkboxes are not selected:


Whats wrong with my code? How can i select the checkboxes?


2 Replies

TS Thomas Schinagl January 29, 2020 07:24 AM UTC

I solved this Problem by myself with the ListBoxFieldSettings {Text = "Text", Value="Value"} but when i add a IconCss the selection of the Checkboxes doesnt work again. I think this is a Bug.




SD Saranya Dhayalan Syncfusion Team January 31, 2020 12:30 PM UTC

Hi Thomas, 
 
Thank you for contacting Syncfusion support 
 
We have checked your reported issue, we confirmed this is issue we have logged the defect report “Listbox iconCss not loading issue”. This fix will be available in our upcoming patch release. 
 
 
Regards, 
Saranya D 


Loader.
Live Chat Icon For mobile
Up arrow icon