Get selection status of a item

Hi,

I've created a listbox with a data template with two fields (an Image and a textblock).

I also have a ok button, when clicked I wanted go thru the listbox and check each item whether it is selected or not.

When I do it like this:

            foreach (CheckListBoxItem item in Apps.Items)

            {

                // check if item is selected

                if (item.IsChecked)

                {

                }

            }


This doesn't work. What do I need to change ? (I attached my sample code)

Thanks and regards

Uwe


Attachment: CheckListApp_a6f30eaa.zip

5 Replies 1 reply marked as answer

SN Sudharsan Narayanan Syncfusion Team November 15, 2021 02:34 AM UTC

Hi Uwe,

Thanks for contacting Syncfusion support,

Currently, we are analyzing your reported issue of “Get Selection Status”. We will validate and update you the details on or before 16th November 2021.

We appreciate your patience until then.

Regards,
 
Sudharsan


UP Uwe Porsch replied to Sudharsan Narayanan November 15, 2021 08:58 AM UTC

Hi Sudharsan ,

thanks for your information.

Regards

Uwe 



SN Sudharsan Narayanan Syncfusion Team November 16, 2021 04:28 PM UTC

Hi Uwe,

Thanks for the patience,

We have checked the reported issue that “Get Selection Status” from our end. We have prepared the sample to achieve the requirement by using the Selected Items of checklist box. So, that you can get the selected items in the button click, please find the sample and code snippet for this,

Sample: https://www.syncfusion.com/downloads/support/forum/170337/ze/CheckListApp906789984.zip

Code Snippet:

 
private void ButtonOk_Click(object sender, RoutedEventArgs e) 
        { 
            foreach (Apps item in Apps.SelectedItems) 
            { 
                 
            } 
 
            Close(); 
        } 


Please check the above sample and let me know your concerns on this. We are happy to assist you.

Regards,
Sudharsan


Marked as answer

UP Uwe Porsch replied to Sudharsan Narayanan November 16, 2021 06:46 PM UTC

Hi Sudharsan,

thanks a lot :-)

Regards

Uwe



SN Sudharsan Narayanan Syncfusion Team November 17, 2021 05:55 AM UTC

Hi Uwe,

 
We are glad to know that your issue has been fixed. Please let us know if you need any other assistance. We are happy to assist you.

Regards,
Sudharsan


Loader.
Up arrow icon