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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Custom Header Text

Thread ID:

Created:

Updated:

Platform:

Replies:

976 Sep 9,2002 10:10 PM UTC Aug 1,2003 02:58 PM UTC WinForms 4
loading
Tags: GridControl
Harvey Green
Asked On September 9, 2002 10:10 PM UTC

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

Harvey Green
Replied On 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 > > >

Clay Burch [Syncfusion]
Replied On 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.

ERobishaw
Replied On August 1, 2003 02:02 PM UTC

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

Administrator [Syncfusion]
Replied On 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.

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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

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

;