How to write text on row header in GridDataBoundGrid ?

Hi,

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

Please let me know if you have any idea.

Thanks,
Akshay

1 Reply

AD Administrator Syncfusion Team February 23, 2007 06:39 PM UTC

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.
Regards,
Rajagopal

Loader.
Up arrow icon