RADGridView Header Height & Tooltip

11 posts, 0 answers
  1. yashpal gohil
    yashpal gohil avatar
    3 posts
    Member since:
    Oct 2009

    Posted 29 Oct 2009 Link to this post


    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.

  2. Martin Vasilev
    Admin
    Martin Vasilev avatar
    1061 posts

    Posted 04 Nov 2009 Link to this post

    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:

    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.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. yashpal gohil
    yashpal gohil avatar
    3 posts
    Member since:
    Oct 2009

    Posted 06 Nov 2009 Link to this post

    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

  5. Martin Vasilev
    Admin
    Martin Vasilev avatar
    1061 posts

    Posted 11 Nov 2009 Link to this post

    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.
  6. poiuytrewq poiuytrewq
    poiuytrewq poiuytrewq avatar
    1 posts
    Member since:
    Feb 2010

    Posted 11 Feb 2010 Link to this post

    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.

  7. Martin Vasilev
    Admin
    Martin Vasilev avatar
    1061 posts

    Posted 18 Feb 2010 Link to this post

    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.
  8. Chad Hensley
    Chad Hensley avatar
    54 posts
    Member since:
    Feb 2005

    Posted 26 Jun 2010 Link to this post

    I need this too.
  9. anand
    anand avatar
    1 posts
    Member since:
    Jul 2008

    Posted 19 Nov 2010 Link to this post

    Did you guys include this functionality in Q3 2010 release ?
  10. Jack
    Admin
    Jack avatar
    2335 posts

    Posted 22 Nov 2010 Link to this post

    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
    Get started with RadControls for WinForms with numerous videos and detailed documentation.
  11. Eric
    Eric avatar
    2 posts
    Member since:
    Jul 2012

    Posted 09 Sep 2015 Link to this post

    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}"  >

  12. Stefan
    Admin
    Stefan avatar
    2891 posts

    Posted 10 Sep 2015 Link to this post

    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
    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
Back to Top
UI for WinForms is Visual Studio 2017 Ready