Calculating height of grid depending on number of rows returned

4 posts, 0 answers
  1. Drammy
    Drammy avatar
    38 posts
    Member since:
    Feb 2008

    Posted 13 Dec 2009 Link to this post

    Hi all,

    Has anyone solved this problem before (or is there a property that I can set)?

    I only want the height of my radGridView to be the height of as many row that are returned.  I don't want the greyspace below the rows.

    Any ideas?


    Thanks

  2. Drammy
    Drammy avatar
    38 posts
    Member since:
    Feb 2008

    Posted 14 Dec 2009 Link to this post

    Anyone?
  3. Pavel Pavlov
    Admin
    Pavel Pavlov avatar
    2039 posts

    Posted 15 Dec 2009 Link to this post

    Hi KevReid,

    Unfortunately we don't have this  as a feature in RadGridView.
    I have already scheduled thisone  to be added - I believe the most intuitive way would be setting RadGridView.Height to Auto to do the trick. We are going to add this  in some of our next releases.

    Meanwhile the single workaround I can suggest is to calculate the height and set it explicitly in code behind.

    The formula should be something simple  like : RadGridView.Height =  RowsCount * 24 + HeaderHieght + GroupPanelHeight.

    And it may be set within the handler of the DataLoaded  event of RadGridView.

    Kind regards,
    Pavel Pavlov
    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.
  4. Michael
    Michael avatar
    15 posts
    Member since:
    Dec 2009

    Posted 06 Apr 2012 Link to this post

    is this still a problem?
Back to Top