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

Hi We are licensed users of Syncfusion. I have a question about cell headers. I would like to let the users set column headers. Is it possible to edit the headers like a text cell? Or what is the best way to do this? I quick reply is appreciated.

Thanks
Sudha

1 Reply

HA haneefm Syncfusion Team November 1, 2007 11:24 PM UTC

Hi Sudha,

You can try these code:

gridControl1.BaseStylesMap["Column Header"].StyleInfo.CellType = "TextBox";
gridControl1.BaseStylesMap["Column Header"].StyleInfo.HorizontalAlignment = GridHorizontalAlignment.Left;
gridControl1.BaseStylesMap["Column Header"].StyleInfo.CellAppearance = GridCellAppearance.Raised;
gridControl1.BaseStylesMap["Column Header"].StyleInfo.Borders.All = new GridBorder(GridBorderStyle.Standard, Color.Black);

gridControl1.AllowSelection ^= GridSelectionFlags.Column; //Avoid the Column selection whe editing the columnheader.

Please let me know if this helps.

Best regards,
Haneef

Loader.
Live Chat Icon For mobile
Up arrow icon