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
close icon

identify click on rowheader

hi all.
how can know if the user clicked on the row header, but not on the row itself(or cells in it)

1 Reply

AD Administrator Syncfusion Team February 8, 2007 05:00 PM UTC

Hi Shachar,

You can handle the TableControlMouseDown event of the grid and use the PointToTableCellStyle method to identify click on rowheader in a grid. Here is a code snippet

private void gridGroupingControl1_TableControlMouseDown(object sender, GridTableControlMouseEventArgs e)
{
GridTableCellStyleInfo style = e.TableControl.PointToTableCellStyle(new Point(e.Inner.X,e.Inner.Y));
if( style != null
&&( style.TableCellIdentity.TableCellType == GridTableCellType.AlternateRecordRowHeaderCell
|| style.TableCellIdentity.TableCellType == GridTableCellType.RecordRowHeaderCell
|| style.TableCellIdentity.TableCellType == GridTableCellType.AddNewRecordRowHeaderCell ))
{
MessageBox.Show("Your clicked on " + style.TableCellIdentity.TableCellType);
}
}

Here is a sample.
GGC_SummaryRow_Custom.zip

Best regards,
Haneef

Loader.
Live Chat Icon For mobile
Up arrow icon