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

Shifting down default header row.

Thread ID:

Created:

Updated:

Platform:

Replies:

14477 May 27,2004 01:05 PM UTC May 27,2004 05:42 PM UTC Windows Forms 2
loading
Tags: GridControl
Vinod
Asked On May 27, 2004 01:05 PM UTC

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.

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

Vinod
Replied On May 27, 2004 05:42 PM UTC

Thanks Clay, worked like a charm!

CONFIRMATION

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.

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

;