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

Row Numbers in Grouping Grid

Is there anyway to display row numbers in the grouping grid control. I only want to count the actual data rows not the caption rows, summary rows, preview rows etc...

3 Replies

AD Administrator Syncfusion Team October 24, 2005 07:07 PM UTC

Try handling the QueryCellStyleInfo event and setting the text there.
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.Text = e.TableCellIdentity.Table.FilteredRecords.IndexOf(e.TableCellIdentity.DisplayElement.ParentRecord).ToString();
	}
}


AD Administrator Syncfusion Team October 24, 2005 07:29 PM UTC

Thanks. Is there any way to control the width of the column? The numbers get a little squished after 9.


AD Administrator Syncfusion Team October 24, 2005 09:05 PM UTC

Try setting: this.gridGroupingControl1.TableOptions.RowHeaderWidth

Loader.
Live Chat Icon For mobile
Up arrow icon