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

CheckBox in DataGrid

Hi

I have a DataGrind and look for some example how to manage a click event. I have CellCheckBoxClick event but I don´t know how I know for example how row is clicked ect.
Do you have some example for this?

1 Reply

DY Deivaselvan Y Syncfusion Team November 30, 2018 07:18 AM UTC

Hi Adam, 

Thanks for contacting Syncfusion support.  

You can make use of the events SfDataGrid.CellClick and SfDataGrid.CellDoubleClick to manage the click operations performed within the DataGrid cells.  

Please refer the following code example. 

Code example :  

this.sfDataGrid.CellClick += OnCellClick; 
this.sfDataGrid.CellDoubleClick += OnCellDoubleClick; 
 
void OnCellClick(object sender, Syncfusion.WinForms.DataGrid.Events.CellClickEventArgs e) 
{ 
    if (e.DataRow.RowIndex == 1) 
    { 
        //Do you customizations here. 
    } 
} 

void OnCellDoubleClick(object sender, Syncfusion.WinForms.DataGrid.Events.CellClickEventArgs e) 
{ 
    if (e.DataRow.RowIndex == 1) 
    { 
        //Do you customizations here. 
    } 
} 


You can use SfDataGrid.TableControl.Click and SfDataGrid.TableControl.DoubleClick events to manage click operations on the control. 

Please refer the following UG links. 

Regards, 
Deivaselvan 


Loader.
Live Chat Icon For mobile
Up arrow icon