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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Row Numbers in Grouping Grid

Thread ID:





36240 Oct 24,2005 06:46 PM UTC Oct 24,2005 09:05 PM UTC WinForms 3
Tags: GridControl
Administrator [Syncfusion]
Asked On October 24, 2005 06:46 PM UTC

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...

Administrator [Syncfusion]
Replied On 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();

Administrator [Syncfusion]
Replied On 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.

Administrator [Syncfusion]
Replied On October 24, 2005 09:05 PM UTC

Try setting: this.gridGroupingControl1.TableOptions.RowHeaderWidth


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon