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.

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

Thread ID:





29773 Jun 2,2005 12:03 PM Jun 3,2005 11:04 AM Windows Forms 2
Tags: GridControl
Lan Mo
Asked On June 2, 2005 12:03 PM

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 01:47 PM

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 11:04 AM

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.

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.