ie Column Header Text:
[3600 x
1200 x
3000 ] <------ This gets cut off
[ row ]
[ row ]
[ row ]
12 Answers, 1 is accepted
Thank you for writing.
You can get or set the height of the column header row by using the code below:
(this.radGridView1.GridElement as GridTableElement).TableHeaderHeight = 100; |
You can also access the TableHeaderHeight property at design-time by using RadGrid's Smart Tag (click on the "Edit UI elements" and locate GridTableElement in the hierarchy).
If you have any other questions, please don't hesitate to ask us.
All the best,
Martin Vasilev
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.

Thank you for writing.
Currently, RadGridView does not support wrapping text in its header cells. We will consider adding this functionality in some of the next releases.
Currently, you could manually split the header text to couple of rows. Please review the code-block below as reference:
void radGridView1_ViewCellFormatting(object sender, Telerik.WinControls.UI.CellFormattingEventArgs e) |
{ |
if (e.CellElement is GridHeaderCellElement && e.CellElement.ColumnIndex == 0) |
{ |
e.CellElement.Text = "First line \nSecond Line"; |
} |
} |
If you need additional assistance, I will glad to help you again.
Greetings,
Martin Vasilev
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.

Thank you for contacting us.
If you want to change the height of header row, you can use the following code snippet:
Me
.RadGridView1.TableElement.TableHeaderHeight = 50
You can set the TextWrap property of column`s header cell using this code:
Private
Sub
radGridView1_ViewCellFormatting(sender
As
Object
, e
As
Telerik.WinControls.UI.CellFormattingEventArgs)
If
TypeOf
e.CellElement
Is
GridHeaderCellElement
AndAlso
e.CellElement.ColumnIndex = 1
Then
e.CellElement.TextWrap =
True
Else
e.CellElement.ResetValue(LightVisualElement.TextWrapProperty, Telerik.WinControls.ValueResetFlags.Local)
End
If
End
Sub
I attached a sample demo with version Q3 2014 SP1(2014.3.1202).
Hope this will help you. Let me know if you have any another questions.
Regards,
Ralitsa
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

but not working with my hierarchical grid
I tried with Master template and Child templates .
Table element doesn't suit for the Master Template.
Thank you for your reply.
You can use the following code snippet to set the height of a child template:
Private
Sub
radGridView1_ViewCellFormatting(sender
As
Object
, e
As
CellFormattingEventArgs)
If
TypeOf
e.CellElement
Is
GridHeaderCellElement
Then
e.CellElement.TextWrap =
True
Else
e.CellElement.ResetValue(LightVisualElement.TextWrapProperty, Telerik.WinControls.ValueResetFlags.Local)
End
If
If
TypeOf
e.CellElement
Is
GridDetailViewCellElement
Then
Dim
tableElement
As
GridTableElement =
DirectCast
(e.CellElement, GridDetailViewCellElement).ChildTableElement
tableElement.TableHeaderHeight = 100
End
If
End
Sub
In the attachments you can find a sample demo.
Should you have further questions, I would be glad to help.
Ralitsa
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

My grid is very simple....just 2 text columns (see attachement 2).
Any help appreciated.
Hugo
Thank you for contacting us.
You can not set the TableHeaderHeight property at design time. You need to set it at run time. Please use the following code snippet in the constructor of the form or in the Load event of form:
this
.radGridView1.TableElement.TableHeaderHeight = 50;
If you have any additional questions, please let me know.
Regards,
Ralitsa
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Hi folks!
I have the same question as this original poster - but I'm several versions down the road and the posted solution(s) do not have any effect on my grid.
The code I'm trying is this:
gridMCs.TableElement.TableHeaderHeight = 50
gridMCs.TableElement.GroupHeaderHeight = 50
Clearly the name of the RadGridView is gridMCs and I'm setting the Column Header and Group Header to a height of 50...but these have no effect whatsoever which leads me to believe I have some OTHER property turned on that prevents these from being effective.
Any suggestions would be terrific!
-Curtis

Ok this is kind of strange but...on a whim I decided to try something:
I deleted the control from my form. I added a new RadGridView and reset the Theme, added my columns and re-wired the events in my Form. NOW the TableHeaderHeight AND GroupHeaderHeight both work.
I don't know what happened or why but I saved the original designer as well as the new one if you folks would like, please email me and i'll send you a .Zip of both files (It's proprietary information that my contract does not allow to be posted on a public board but I can share with the developer of the controls themselves.)
Sorry about my clearly unnecessary, previous post!
-Curtis
We are not aware of an issue in the grid which could result in the initially described issue. I am glad that you have managed to resolve it. In case you experience it again please open up a support ticket and send us your project so that we can investigate it on our end.
Regards,
Hristo
Progress Telerik