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
close icon

Shifting down default header row.

Hi I am dynamically creating the grid and was wondering if there is any way to tell the grid to display it''s default header row =>a,b,c etc on the second row.

2 Replies

AD Administrator Syncfusion Team May 27, 2004 01:13 PM UTC

One way you can do this is to add an extra header row, and then handle PrepareViewStyleInfo and set the text there for this new header row.
//add the row
this.grid.Rows.HeaderCount = 1;
this.grid.Rows.FrozenCount = 1;


//the event handler
private void PrepareViewStyleInfo(object sender, GridPrepareViewStyleInfoEventArgs e)
{
	if(e.ColIndex > 0 && e.RowIndex == 1)
	{
		e.Style.Text = GridRangeInfo.GetAlphaLabel(e.COlIndex);
	}
}


VI Vinod May 27, 2004 05:42 PM UTC

Thanks Clay, worked like a charm!

Loader.
Live Chat Icon For mobile
Up arrow icon