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

Sfdatagridview CellDoubleClick Event

SfdatagridTableSummaryDoubleClick-min115 (1).jpg Hello everyone,

When I click on Table Summary cell, how do I know which column it belongs to?


I sent a picture for you


please help me very important !

THANK YOU :)


3 Replies 1 reply marked as answer

SJ Sathiyathanam Jeyakumar Syncfusion Team December 19, 2022 01:20 PM UTC

Hi Murad Jafarov,

We have prepared the sample based on your requirement, and you can get the column index based on the mouse point in SFDataGrid by calling the PointToCellRowColumnIndex() method. Refer to the code snippets and screenshots to get more information.

this.sfDataGrid1.TableControl.MouseDoubleClick += SfDataGrid1_MouseDoubleClick;

 

private void SfDataGrid1_MouseDoubleClick(object sender, MouseEventArgs e)

{

    var rowColumnIndex = this.sfDataGrid1.TableControl.PointToCellRowColumnIndex(new Point(e.X, e.Y));

 

    if (this.sfDataGrid1.TableControl.IsTableSummaryIndex(rowColumnIndex.RowIndex))

    {

        var columnName = this.sfDataGrid1.Columns[rowColumnIndex.ColumnIndex];

        MessageBox.Show("Clicked column : " + columnName);

    }

}



Regards

Sathiyathanam


Attachment: Sample_e8d875c1.zip


MJ Murad Jafarov December 20, 2022 05:38 AM UTC



Translation results

Translation result

Thank you very much, you helped me a lot :)



DM Dhanasekar Mohanraj Syncfusion Team December 20, 2022 02:09 PM UTC

Murad Jafarov,

If you are satisfied with our response, please mark it as an answer. Otherwise, please let us know if you have any further queries on this. We are happy to help you.


Marked as answer
Loader.
Up arrow icon