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

current cell ''s column mapping name (underlying field name)

Thread ID:





29773 Jun 2,2005 04:03 PM UTC Jun 3,2005 03:04 PM UTC WinForms 2
Tags: GridControl
Lan Mo
Asked On June 2, 2005 04:03 PM UTC

How can I get current cell ''s column mapping name (underlying field name) when clicking in a cell? I used this code, but I noticed the column index keep changing when grouping. int iCurrCol=gdBase.TableControl.CurrentCell.ColIndex-1; if (iCurrCol>=0) { string sFieldName=gdBase.TableDescriptor.Columns[iCurrCol].Name; }

Administrator [Syncfusion]
Replied On June 2, 2005 05:47 PM UTC

Try: GridCurrentCell cc = gdBase.TableControl.CurrentCell; GridTableCellStyleInfo style = gdBase.TableControl.Model[cc.RowIndex, cc.ColIndex]; string colName = style.TableCellIdentity.Column.MappingName;

Lan Mo
Replied On June 3, 2005 03:04 PM UTC

It works perfect. Thanks for great help. Lan >Try: > >GridCurrentCell cc = gdBase.TableControl.CurrentCell; >GridTableCellStyleInfo style = gdBase.TableControl.Model[cc.RowIndex, cc.ColIndex]; >string colName = style.TableCellIdentity.Column.MappingName; >


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

or the page will be automatically redirected to 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