I have a data grid and I am wondering if the column header text can be vertical ? If so, how do you make the text vertical?
Within the grid I have columns with Y and N, I want to make the background of the cell Green if Y and Red if N - what do I need to do to achieve this?
Hello, Neil, In order make the header text vertical, feel free to use the following code snippet:
this.radGridView1.TableElement.TableHeaderHeight = 90;
private void radGridView1_ViewCellFormatting(object sender, CellFormattingEventArgs e)
GridHeaderCellElement element = sender as GridHeaderCellElement;
if (element != null)
element.TextOrientation = Orientation.Vertical;
element.FlipText = true;
As to the question about styling the cell considering the data value, it is appropriate to use the CellFormatting event. Please refer to the following help article demonstrating how to use it: https://docs.telerik.com/devtools/winforms/controls/gridview/cells/formatting-cellsI hope this information helps. If you need any further assistance please don't hesitate to contact me.
Dess | Tech Support Engineer, Sr.