Posted 1 March 2021, 3:17 am EST
How can I set the back and fore colors of flexgrid’s column header
Forums Home / ComponentOne / WinForms Edition
Posted by: kodees on 1 March 2021, 3:17 am EST
Posted 1 March 2021, 3:17 am EST
How can I set the back and fore colors of flexgrid’s column header
Posted 1 March 2021, 3:34 am EST
And I also want to set the columnheader style - like raised, sunken.
and how to set the column header text (I already have 5 cols, so I want to set it) ?
Posted 2 March 2021, 4:17 am EST
Hi,
You can change the appearance of column headers by customizing the default style used to show Fixed cells. You can access the CellStyle collection of the FlexGrid using its Styles property and then access the CellStyle used for the fixed cells using the Fixed property of the CellStyleCollection.
Or You can set a custom cell style to the row which shows the column headers. You can use the Style property of the Row of FlexGrid to set the custom style.
For more info on customizing cell appearance, please refer:
https://www.grapecity.com/componentone/docs/win/online-flexgrid/cellappearance.html
https://www.grapecity.com/componentone/docs/win/online-flexgrid/settingthebackgroundcolor.html
You can change the caption for a column by either using the Caption property of the Column of FlexGrid or setting the value directly to the header cell of the column.
Please refer to the sample attached.
Regards.
Avnish