Handle click event for Table summary column

Is there a way to handle click on Table summary row cells?

The below screenshot is the SfDataGrid bound to a data table and AutoGenerateColumns is set to true.


I have added a AutoGeneratingColumn handler to add a summary column.


3 Replies

JG Jai Ganesh S Syncfusion Team March 22, 2018 02:04 AM UTC

Hi Somanna, 
 
You can achieve your requirement to handle the click event for TableSummary Cells by wiring the MouseLeftButtonUp event like below, 
 
private void SfGrid_MouseLeftButtonUp(object sender, MouseButtonEventArgs e) 
{ 
    var point = Mouse.GetPosition(this.sfGrid.GetVisualContainer()); 
    var rowColumnIndex = this.sfGrid.GetVisualContainer().PointToCellRowColumnIndex(point); 
 
    if (this.sfGrid.IsTableSummaryIndex(rowColumnIndex.RowIndex)) 
    { 
        //Do your code here 
    } 
} 
 
 
Regards, 
Jai Ganesh S 



SC Somanna Chottekalapanda March 22, 2018 09:55 AM UTC

Thanks Jai Ganesh. I will give it a try.


JG Jai Ganesh S Syncfusion Team March 23, 2018 04:39 AM UTC

Hi Somanna,  
 
Thank you for the update. 
 
Please let us know if you need further assistance on this. 
 
Regards, 
Jai Ganesh S 


Loader.
Up arrow icon