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

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

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; }

2 Replies

AD Administrator Syncfusion Team June 2, 2005 12:47 PM

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


LM Lan Mo June 3, 2005 10: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; >

Loader.
Live Chat Icon For mobile
Up arrow icon