GridGroupingControl - Getting mapping name of current column

When I edit a cell I catch the event TableControlCurrentCellEditingComplete, in the handler I need to get the mapping name of the current column. I can get the column index by: GridCurrentCell cc = e.TableControl.CurrentCell; GridTextBoxCellRenderer gcrb = cc.Renderer as GridTextBoxCellRenderer; gcrb.CurrentCell.ColIndex I can then get mappingName by: dataGrid.TableDescriptor.Columns[colIndex-1].Name but if I then move around columns this doesn''t work. Is there a way to directly get the mapping name from, say, the CurrentCell?

2 Replies

AD Administrator Syncfusion Team July 12, 2006 11:34 PM UTC

Hi Vito, One way to access the column name is by using GridTableCellStyleInfoIdentitiy. The following is the code snippet +++++++++++++++++++++++++++++ GridTableCellStyleInfoIdentity style = this.gridGroupingControl1.TableModel[cc.RowIndex,cc.ColIndex].TableCellIdentity; if(style.TableCellType == GridTableCellType.RecordFieldCell || style.TableCellType == GridTableCellType.AlternateRecordFieldCell) Console.WriteLine(style.Column.Name); +++++++++++++++++++++++++++++ Best regards, Madhan


SV Supriya Varne December 29, 2014 11:25 AM UTC

Hi,
Sir I want column name of current cell of child table when using the TableControlCurrentCellEditingComplete event of gridgrouping control.

Thank u and regards,
Supriya

Loader.
Up arrow icon