This is a migrated thread and some comments may be shown as answers.

[Solved] Set the row height

1 Answer 146 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
FinallyInSeattle
Top achievements
Rank 1
FinallyInSeattle asked on 05 Apr 2012, 02:38 AM
I have one instance of the grid in my pages that I'm trying to set the row height (don't want to change it globally).  I've tried TableHtmlAttributes and setting HtmlAttributes in a RowAction and a ColumnAction.  It still is getting the row height from the ".t-grid td" setting.  What is the recommended way to change this for just once instance of a grid in an application?

Thanks in advance!

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 05 Apr 2012, 08:09 AM
Hi Lori,

RowAction should work if you use it like this:

.RowAction(row =>
{
row.HtmlAttributes.Add("style", "height:100px;");
})

However, a lot more elegant approach is to use CSS:

/* use only the applicable selector */
 
#GridName .t-grid-content tr ,  /* if scrolling is enabled */
#GridName tbody tr /* if scrolling is not enabled */
{
       height: 100px;
}


Greetings,
Dimo
the Telerik team
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 Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now.
Tags
Grid
Asked by
FinallyInSeattle
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or