Custom Header Text

Hi, I'd like to change the Text in the Column Headers from the standard A,B,C, etc. to a user defined string. From looking at the docs, I need to get access to the CellValue property of either a GridHeaderCellRenderer or a GridSortColumnHeaderCellRenderer object. How can I get access to these objects from my standard GridControl? Thanks, Harvey Green Crocker Data

4 Replies

HG Harvey Green September 10, 2002 04:33 AM UTC

I've found that I can just change these values using gridControl1[0, col].Text = "..." > Hi, > I'd like to change the Text in the Column Headers from the standard A,B,C, etc. to a user defined string. > > From looking at the docs, I need to get access to the CellValue property of either a GridHeaderCellRenderer or a GridSortColumnHeaderCellRenderer object. > > How can I get access to these objects from my standard GridControl? > > Thanks, > > Harvey Green > Crocker Data > > >


CB Clay Burch Syncfusion Team September 10, 2002 05:14 AM UTC

You are correct. In a GridControl, the column headers are just row 0 of the grid. They look different than other cells only because their GridStyleInfo objects have properties set to make this 'header-like' appearance. So, you can change things in the header by accessing the GridStyleInfo object just as with any other cell.


ER ERobishaw August 1, 2003 02:02 PM UTC

Can you set custom header text in design mode from the IDE? Eric


AD Administrator Syncfusion Team August 1, 2003 02:58 PM UTC

For a GridControl, turn off the Columns flag in the grid's AllowSelection property. Then in interactive mode, if you click a column header, it will not select the column, and will allow you to change the text. You can later turn the columns back on.

Loader.
Up arrow icon