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.
Unfortunately, activation email could not send to your email. Please try again.

identify click on rowheader

Thread ID:

Created:

Updated:

Platform:

Replies:

56017 Feb 8,2007 08:41 AM Feb 8,2007 12:00 PM Windows Forms 1
loading
Tags: Tools
Shachar Shimshon
Asked On February 8, 2007 08:41 AM

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

Administrator [Syncfusion]
Replied On February 8, 2007 12:00 PM

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

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;