RadGridView RowHeight

9 posts, 2 answers
  1. Dario
    Dario avatar
    4 posts
    Member since:
    Sep 2014

    Posted 23 Sep 2014 Link to this post

    Hello,

    I'm trying to set the rows height for my GridView but I can't find a method...

    How can I set the custom rowheight for each row?

    I readed lot of thread on this forum but the properties that they use seems to not exists...

    May be the forum thread are old and that they are no more valid for the 2014 telerik version...

    Thanks
    Ciao
  2. Answer
    Mark
    Mark avatar
    18 posts
    Member since:
    Nov 2011

    Posted 23 Sep 2014 in reply to Dario Link to this post

    You have to use code Dario...

    RadGridView.TableElement.RowHeight = 20
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Answer
    Stefan
    Admin
    Stefan avatar
    2890 posts

    Posted 24 Sep 2014 Link to this post

    Hi guys,

    Using the approach that Mark suggested will set the height for all rows in the grid. 

    If you want to set the height on per row basis, here is how to do it:
    radGridView1.Rows[0].Height = 100;

    Of course, both approaches will work only when AutoSizeRows is false.

    @Mark, thank you for the community effort. I have updated your Telerik Points for this.

    Regards,
    Stefan
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  5. Dario
    Dario avatar
    4 posts
    Member since:
    Sep 2014

    Posted 24 Sep 2014 Link to this post

    Thanks you all, it works properly 

    Ciao
  6. BestCoder
    BestCoder avatar
    3 posts
    Member since:
    Feb 2014

    Posted 02 Nov 2015 in reply to Mark Link to this post

    Setting the row height using RadGridView.TableElement.RowHeight = xx appears to no longer work when code is present in the generated designer file after configuring the new column groups feature added in Q3 2015 (see http://www.telerik.com/help/winforms/gridview-viewdefinitions-column-groups-view.html). Anyone have any suggestions?

     

    columnGroupsViewDefinition1.ColumnGroups.Add(gridViewColumnGroup1);
    columnGroupsViewDefinition1.ColumnGroups.Add(gridViewColumnGroup2);
    columnGroupsViewDefinition1.ColumnGroups.Add(gridViewColumnGroup3);
    columnGroupsViewDefinition1.ColumnGroups.Add(gridViewColumnGroup4);
    columnGroupsViewDefinition1.ColumnGroups.Add(gridViewColumnGroup5);
    this.MyGridMasterTemplate.ViewDefinition = columnGroupsViewDefinition1;​

  7. Stefan
    Admin
    Stefan avatar
    2890 posts

    Posted 03 Nov 2015 Link to this post

    Hello Danny,

    The API mentioned, does not concern the grid rows height, when columns group view definition is used. In fact, I don't think it was ever taken into consideration (I checked with a couple older versions).

    To set all rows height, you can iterate the rows and set each RowInfo's RowHeight property as shown in my previous post in this thread.

    Other means to size the layout are the RowSpan property of a group:
    columnGroupsViewDefinition.ColumnGroups[0].RowSpan

    and the MinHeight property of a row in the column layout:
    columnGroupsViewDefinition.ColumnGroups[0].Rows[0].MinHeight

    I hope that you find this information useful. Should you have any other questions, do not hesitate to contact us.

    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
  8. Ramees
    Ramees avatar
    1 posts
    Member since:
    Apr 2014

    Posted 29 Feb in reply to Stefan Link to this post

    Hello,

    this.radGridView1.TableElement.RowHeight has stopped working after upgrading to version 2016.1.216.40

     Thanks

    Ramees

  9. Stefan
    Admin
    Stefan avatar
    2890 posts

    Posted 29 Feb Link to this post

    Hello Ramees,

    Thank you for writing.

    Could you please provide a sample where this is not working? Also, are you using ColumnGroupsViewDefinition or you are using the default row layout?

    I am looking forward to your reply.

    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
  10. Chirag
    Chirag avatar
    1 posts
    Member since:
    Mar 2016

    Posted 11 Apr Link to this post

    Thanks

     

Back to Top
UI for WinForms is Visual Studio 2017 Ready