Row numbers in Goruping Grid

Hi Is there a way to display row numbers in the grouping grid? Thanks Sameer

1 Reply

AD Administrator Syncfusion Team April 21, 2005 07:57 AM UTC

One way you can do this is to handle the QueryCellStyleInfo event and set the row header text there.
//in form.load
this.grid.QueryCellStyleInfo += new GridTableCellStyleInfoEventHandler(grid_QueryCellStyleInfo);
this.grid.TableOptions.RowHeaderWidth = 30; 

//the handler
private void gridGroupingControl1_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e)
{
	if(e.TableCellIdentity.TableCellType == GridTableCellType.RecordRowHeaderCell
		|| e.TableCellIdentity.TableCellType == GridTableCellType.AlternateRecordRowHeaderCell)
	{
		e.Style.CellType = "Header";
		e.Style.CellValue = this.gridGroupingControl1.Table.FilteredRecords.IndexOf((e.TableCellIdentity.DisplayElement as GridRecordRow).ParentRecord) + 1;
	}
}

Loader.
Up arrow icon