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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

columnheader text of a selected cell

Thread ID:





71297 Jan 25,2008 06:06 AM UTC Jan 28,2008 09:22 AM UTC WinForms 1
Tags: GridControl
John Ruiz
Asked On January 25, 2008 06:06 AM UTC


Please suggest how i could get the column header text of a selected cell. For now I am doing the below but it seems the same is not valid for grouped rows

int colIndex = gridGroupingControl.TableControl.CurrentCell.Renderer.CurrentCell.ColIndex - 1;
String headerText = gridGroupingControl.TableDescriptor.Columns[colIndex].HeaderText;


Fathima Shalini P [Syncfusion]
Replied On January 28, 2008 09:22 AM UTC

Hi John,

Thank you for your interest in Syncfusion Products.

The header text of the selected cell can be retrieved using TableControlCellClick event of the GridGrouping Control, even when the control is grouped.

void gridGroupingControl1_TableControlCellClick(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlCellClickEventArgs e)
int field = e.TableControl.TableDescriptor.ColIndexToField(e.Inner.ColIndex);

Please have a look at the following sample that illustrates this:


Please let me know if any concerns.



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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon