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.
Unfortunately, activation email could not send to your email. Please try again.

Row Numbers in Grouping Grid

Thread ID:





36240 Oct 24,2005 02:46 PM Oct 24,2005 05:05 PM Windows Forms 3
Tags: GridControl
Administrator [Syncfusion]
Asked On October 24, 2005 02:46 PM

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 03:07 PM

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 03:29 PM

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 05:05 PM

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.

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.