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

Column Headers

Does any one know if you can change the column headers in design time. ie: the A, B, C given by to default to foo, bar, baz, or what ever custom names you want. I already know how to do it in code but I would like to know if it can be done in design time.

5 Replies

AD Administrator Syncfusion Team April 4, 2003 01:15 AM

You can do this, but you have to make sure that the Column is not included in the grid's AllowSelections property. If you have this flag included, then you cannot just select the column header cell by itself. Instead, clicking the column header selects the entire column. So, first uncheck Column in the AllowSelection prperty of the grid. Then turn off the global mode and click on the cell settings button to set cell properties. Then click the column header and change its Text property, and so on. When you are finished you can reset the Column flag if you want that AllowSelections to include it.


IM imran July 22, 2003 08:07 AM

i am trying to change the text property of the column headers in the design mode. when i switch to interactive mode, i dont seem to find 'cell settings button'. where does this show up ? >Then turn off the global mode and click on the >cell settings button to set cell properties. >Then click the column header and change its >Text property, and so on.


AD Administrator Syncfusion Team July 22, 2003 08:33 AM

Are you using a GridControl? You cannot design cell specific properties for a GridDataBoundGrid. For a GridDataBoundGrid, you need to add GridBoundColumns for eachcolumn, and then set teh HeaderText for each column.


AD Administrator Syncfusion Team July 22, 2003 09:00 AM

yes. i am using GridControl. > Are you using a GridControl? You cannot design cell specific properties for a GridDataBoundGrid. > > For a GridDataBoundGrid, you need to add GridBoundColumns for eachcolumn, and then set teh HeaderText for each column. >


AD Administrator Syncfusion Team July 22, 2003 09:46 AM

To change a column header, 1)toggle the global mode off. 2)Set the grid.AllowSelections property so it does not include Columns. 3)Click the Cell Settings button at top of the propertygrid. 4)Click the header you want to change. 5)Open up the CellSettings node, and change the Text property. 6)Then click off this property onto another property to see teh change in the grid.

Loader.
Live Chat Icon For mobile
Up arrow icon