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

GridDataCheckBoxVisibleColumn OnChecked Event?

I'm curious if there is anyway to get an event to fire when checkbox in a GridDataCheckBoxVisibleColumn is either checked or unchecked.  Looking at the events for it, I don't see that lasted.  Is there a way to get this effect?

Thanks,
Jared

3 Replies

GA Gobinath A Syncfusion Team April 14, 2013 02:34 PM UTC

Hi Jared,,

Thank you for contacting Syncfusion support.

You can achieve your requirement by using the below code snippet,

Code Snippet[C#]:

this.SyncGrid.CurrentCellLoaded += new GridControlBase.GridCurrentCellLoadedEvent(SyncGrid_CurrentCellLoaded);
void SyncGrid_CurrentCellLoaded(object sender, GridCurrentCellLoadedEventArgs e)
{
    var checkbox = e.UIElement as CheckBox;
    if (checkbox != null)
    {
        checkbox.Checked -= new RoutedEventHandler(checkbox_Checked);
        checkbox.Unchecked -= new RoutedEventHandler(checkbox_Unchecked);
        checkbox.Checked += new RoutedEventHandler(checkbox_Checked);
        checkbox.Unchecked += new RoutedEventHandler(checkbox_Unchecked);
    }            
}
//Event for Unchecked 
void checkbox_Unchecked(object sender, RoutedEventArgs e)
{
         
}
 
//Event for Checked
void checkbox_Checked(object sender, RoutedEventArgs e)
{
         
}

For your reference, we have also prepared the sample based on your requirement and you can find the sample under the following location.

Sample: GridDataControl_CheckBoxColumn (2).zip

Please let us know if you have any queries.

 

 

Regards,

Gobinath A.

 



MS Mark Stevens July 9, 2013 10:09 PM UTC

If I click on the link to the example it takes me to a site under construction page. I've tried this a few times at different times of the day with no success.


GA Gobinath A Syncfusion Team July 25, 2013 04:46 PM UTC

Hi Mark Stevens,

 

Sorry for the inconvenience caused.

The provided sample was unable to download at you end might be because of our server issue. We have reloaded the sample again and could you please check now.

Sample: GridDataControl_CheckBoxColumn.zip

 

Please let us know if you have any queries.

 

Regards,

Gobinath A.

 


Loader.
Live Chat Icon For mobile
Up arrow icon