Hi Tannearu,
To display the record number on the RowHeader of the grouping grid, you need to handle the QueryCellStyleInfo Event. The code below will help you to accomplish your task. Please refer to the Sample attached for implementation.
this.gridGroupingControl1.TableControl.TableDescriptor.Appearance.RowHeaderCell.CellType = "Header";
this.gridGroupingControl1.TableOptions.RowHeaderWidth = 35;
//Subscribe the QueryCellStyleInfo event.
this.gridGroupingControl1.QueryCellStyleInfo +=new GridTableCellStyleInfoEventHandler(gridGroupingControl1_QueryCellStyleInfo);
private void gridGroupingControl1_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e)
{
if( e.Style.CellType == "Header" )
{
Element el = e.TableCellIdentity.DisplayElement;
if( el.Kind == DisplayElementKind.Record)
{
GridRecordRow recRow = el as GridRecordRow;
if( recRow.ParentRecord != null)
{
int iRecordIndex = el.ParentTable.UnsortedRecords.IndexOf(recRow.ParentRecord);
e.Style.Text = (iRecordIndex + 1).ToString() ;
}
}
}
}
Here is a modified sample.
GGCNumberedRowHeader.zipBest Regards,
Haneef