yashpal gohil
Top achievements
Rank 1
yashpal gohil
asked on 29 Oct 2009, 11:19 AM
Can we change RADGridView Header Height at runtime?
Situation is like this:
I need to display following like RadGridview in Windows Application.
.......... | Col1 | Col2 | Col3 |................
.......... |Col11|Col12|Col13| c | c | c | c | c | ....................
| o | o | o| o | o |
| l | l | l | l | l |
| 21 |22 |23|24 |25 |
1) Is that possible to display column header vertically?
2) If (1) is not possible then can we change Header height?
3) can we give ToolTip to each column header and its sub-column header?
Probably attached image may clear the idea.
Is there any solution for this situation?
Thanks.
10 Answers, 1 is accepted
0
Hello yashpal gohil,
Thank you for writing.
You can change the text orientation by using TextOrientation property in ViewCellFormatting event. Also you can set the header row height using the TableHeaderHeight property. Please, consider the following code:
As for the ToolTip question, I recommend you check our Demo application and in particular GridView/Tooltips example.
Write me back if you have any other question.
Sincerely yours,
Martin Vasilev
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Thank you for writing.
You can change the text orientation by using TextOrientation property in ViewCellFormatting event. Also you can set the header row height using the TableHeaderHeight property. Please, consider the following code:
this
.radGridView1.GridElement.TableHeaderHeight = 100;
void
radGridView1_ViewCellFormatting(
object
sender, CellFormattingEventArgs e)
{
if
(e.CellElement
is
GridHeaderCellElement)
{
e.CellElement.TextOrientation = Orientation.Vertical;
((GridViewTableHeaderRowInfo)e.CellElement.RowInfo).Height = 100;
}
}
As for the ToolTip question, I recommend you check our Demo application and in particular GridView/Tooltips example.
Write me back if you have any other question.
Sincerely yours,
Martin Vasilev
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
yashpal gohil
Top achievements
Rank 1
answered on 06 Nov 2009, 09:48 AM
Hi Martin,
thanks for your effort in solving problem of mine.
Here I want to say that even using your code I can't get desired result.
Any way I get tooltip for column and textfields using some other article.
When I change orientation of text direction of each character rotates! thing I don't wont.
And height of header I can't increase with various methods including mention by you.
This may because I have done Grouping with column.
Please check these details.
Thanks,
yashpal
thanks for your effort in solving problem of mine.
Here I want to say that even using your code I can't get desired result.
Any way I get tooltip for column and textfields using some other article.
When I change orientation of text direction of each character rotates! thing I don't wont.
And height of header I can't increase with various methods including mention by you.
This may because I have done Grouping with column.
Please check these details.
Thanks,
yashpal
0
Hi yashpal gohil,
Thank you for getting back to me.
I have tested my code with latest Q3 2009 release and it works for grouped RadGridView as well. If you are using older version I highly recommend that you to download the latest one and give it a try. It has a numerous fixes and improvements. Please, let me know if you still experience any difficulties on this matter.
Greetings,
Martin Vasilev
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Thank you for getting back to me.
I have tested my code with latest Q3 2009 release and it works for grouped RadGridView as well. If you are using older version I highly recommend that you to download the latest one and give it a try. It has a numerous fixes and improvements. Please, let me know if you still experience any difficulties on this matter.
Greetings,
Martin Vasilev
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
poiuytrewq poiuytrewq
Top achievements
Rank 1
answered on 11 Feb 2010, 09:47 PM
Martin,
Does your full example use the ColumnGroupsViewDefinition like yashpal is trying to do? Like yashpal, I've also found that the RadGridView simply ignores the TableHeaderHeight property when the grid uses the ColumnGroupsViewDefinition.
I'm using 2009 Q3 SP1.
0
Hello poiuytrewq poiuytrewq,
Actually, ColumnGroupsViewDefinition does not support changing the header row height. We will include this functionality in some of the future releases. Let me know if you have other questions.
Kind regards,
Martin Vasilev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Actually, ColumnGroupsViewDefinition does not support changing the header row height. We will include this functionality in some of the future releases. Let me know if you have other questions.
Kind regards,
Martin Vasilev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Chad Hensley
Top achievements
Rank 1
answered on 26 Jun 2010, 10:49 PM
I need this too.
0
anand
Top achievements
Rank 1
answered on 19 Nov 2010, 07:45 PM
Did you guys include this functionality in Q3 2010 release ?
0
Hi anand,
No, currently this feature is not available in RadGridView and we have not scheduled this task. I added it as a feature request in our PITS system where people can vote and when more people request the same functionality we will raise its priority.
If you have any other question, we will be glad to help.
Greetings, Jack
the Telerik team
No, currently this feature is not available in RadGridView and we have not scheduled this task. I added it as a feature request in our PITS system where people can vote and when more people request the same functionality we will raise its priority.
If you have any other question, we will be glad to help.
Greetings, Jack
the Telerik team
0
Eric
Top achievements
Rank 1
answered on 09 Sep 2015, 06:18 PM
To fix the height of the header row, create a new style which you can store in your resource dictionary:
<Style x:Key="GridViewHeaderRowStyle" TargetType="telerik:GridViewHeaderRow">
<Setter Property="Height" Value="40"/>
</Style>
then set the HeaderRowStyle with the newly created style:
<t:RadGridView x:Name="MainGrid"
HeaderRowStyle="{DynamicResource GridViewHeaderRowStyle}" >
0
Hello Eric,
This forum concerns Telerik UI for WinForms, while your answer seems to be for another product. Just wanted to let you know.
Regards,
Stefan
Telerik
This forum concerns Telerik UI for WinForms, while your answer seems to be for another product. Just wanted to let you know.
Regards,
Stefan
Telerik
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Feedback Portal
and vote to affect the priority of the items