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

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 12:33 AM

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 01:14 AM

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 10:02 AM

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


AD Administrator Syncfusion Team August 1, 2003 10:58 AM

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.
Live Chat Icon For mobile
Up arrow icon