Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1253
CheckboxColumn
posted

Hi,

I have datasource which I bind to a XamWebGrid where one the columns is a CheckBoxColumn.   I have a button to loop through the rows of the grid.  Is there a way on how to detect which rows are checked?  Thanks!

  • 21382
    posted

    Since the checkbox is bound to a field on your data object, the quickest way would be to iterate through your collection and find which objects have that value to be true.

     

    Or you could hook up a PropertyChanged event to your data objects (if they support INotifyPropertyChanged) and record which objects record a property changed for that field.

     

    Or (similar to option 1) you could write a LINQ statement to return the set of objects from your collection that have a true value on the field.