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 Goruping Grid

Thread ID:





27980 Apr 21,2005 01:36 AM Apr 21,2005 03:57 AM Windows Forms 1
Tags: Grouping
Sameer Patil
Asked On April 21, 2005 01:36 AM

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

Administrator [Syncfusion]
Replied On April 21, 2005 03:57 AM

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;


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.