This is a migrated thread and some comments may be shown as answers.
radgrid row height
6 Answers 252 Views
This is a migrated thread and some comments may be shown as answers.
JJ
Top achievements
Rank 1
JJ asked on 17 Feb 2011, 08:10 PM
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?

6 Answers, 1 is accepted

Sort by
0
Galin
Telerik team
answered on 23 Feb 2011, 11:31 AM
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!
0
LamKhoa
Top achievements
Rank 1
answered on 20 Sep 2013, 04:06 AM
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.
0
Galin
Telerik team
answered on 24 Sep 2013, 08:34 AM
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.
0
LamKhoa
Top achievements
Rank 1
answered on 24 Sep 2013, 10:22 PM
I set MasterTableView.ItemStyle.FontSize = FontUnit.XXLarge and as you can see in the attached pic, the row height didn't increase accordingly.
0
Galin
Telerik team
answered on 25 Sep 2013, 12:28 PM
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.
0
LamKhoa
Top achievements
Rank 1
answered on 25 Sep 2013, 02:08 PM
Thanks. It works.
Tags
Grid
Asked by
JJ
Top achievements
Rank 1
Answers by
Galin
Telerik team
LamKhoa
Top achievements
Rank 1
Share this question
or