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.

How to write text on row header in GridDataBoundGrid ?

Thread ID:





57012 Feb 23,2007 11:57 AM Feb 23,2007 01:39 PM Windows Forms 1
Tags: GridControl
Asked On February 23, 2007 11:57 AM


I am using GridDataBoundGrid and want row header also with some text on that.

Please let me know if you have any idea.


Administrator [Syncfusion]
Replied On February 23, 2007 01:39 PM

Hi Akshay,

To have some text on rowheaders, try the code below.

this.gridDataBoundGrid1.BaseStylesMap["Row Header"].StyleInfo.CellType = "Header";
this.gridDataBoundGrid1.BaseStylesMap["Row Header"].StyleInfo.Text = "Text";

If you like to show different text for each row, then catch the PrepareViewStyleInfo event of grid, there check for e.RowIndex and e.ColIndex and set the e.Style.Text that you want to see.

If you like to have numbered rowheaders in a GridDataBoundGrid, try these property settings. This will help you.

this.gridDataBoundGrid1.BaseStylesMap["Row Header"].StyleInfo.CellType = "Header";
this.gridDataBoundGrid1.Model.Options.NumberedRowHeaders = true;

Let us know if you have any further queries.


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.