radgrid row height

7 posts, 0 answers
  1. JJ
    JJ avatar
    147 posts
    Member since:
    May 2010

    Posted 17 Feb 2011 Link to this post

    Is there anyway can make radgrid row height grow free when text size on the row changes?
    I have html column bind to the grid, sometime the html text size is better that the row height to get text overlap. Anyway to make the row height free?

  2. Galin
    Admin
    Galin avatar
    526 posts

    Posted 23 Feb 2011 Link to this post

    Hello JJ,

    By default the rows are not with fixed height, perhaps you have set the height property.

    Try to add the following css:
    .RadGrid .rgRow td,
    .RadGrid .rgAltRow td,
    .RadGrid .rgEditRow td,
    .RadGrid .rgFooter td,
    .RadGrid td
    {
        height: auto;
    }

    If this fixes the problem, then find what is the cause of the problem, e.g. where is the grid rows height set in your aplication.

    If it doesn't fix the problem, you can use tools such as  Firebug for Firefox or IE Developer Toolbar. Both are activate with shortcut key F12 and are very useful for debugging CSS-related issues. Try to find which CSS rule overrides the height property and remove it.

    Kind regarsds,
    Galin
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. LamKhoa
    LamKhoa avatar
    92 posts
    Member since:
    Jun 2011

    Posted 19 Sep 2013 Link to this post

    I tried the css that you gave, but it didn't work. I looked everywhere and I'm 100% sure that I didn't have any css class that might have override the auto-size row heights property. Would you please give me a sample project to demonstrate that it works?

    Thanks.
  5. Galin
    Admin
    Galin avatar
    526 posts

    Posted 24 Sep 2013 Link to this post

    Hi LamKhoa,

    You can find a sample page in the attached file. Please check it out and let me know how it goes.


    Regards,
    Galin
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
  6. LamKhoa
    LamKhoa avatar
    92 posts
    Member since:
    Jun 2011

    Posted 24 Sep 2013 Link to this post

    I set MasterTableView.ItemStyle.FontSize = FontUnit.XXLarge and as you can see in the attached pic, the row height didn't increase accordingly.
  7. Galin
    Admin
    Galin avatar
    526 posts

    Posted 25 Sep 2013 Link to this post

    Hi LamKhoa,

    The reason of the described behavior is the line-height of the text, so you should increase it or set it to be relevant to the font-size as following
    div.RadGrid .rgMasterTable
    {
        line-height: normal;
    }

    I hope this helps.

    Regards,
    Galin
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
  8. LamKhoa
    LamKhoa avatar
    92 posts
    Member since:
    Jun 2011

    Posted 25 Sep 2013 Link to this post

    Thanks. It works.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017