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

[Solved] Vertically aligning data in a cell

2 Answers 140 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.
Brendan Vogt
Top achievements
Rank 1
Brendan Vogt asked on 25 Sep 2010, 09:53 AM
Hi,

I'm using the grid to display my data.  Sometimes another column in the row would have alot of data, then the data in the other columns are vertically centered.  I tried adding an HTML attribute to the column as such:

columns.Bound(m => m.ApplicationID).Width("6%").Title("ID").HtmlAttributes(new { valign = "top" });

In the view source it looks like this:

<td valign="top">1</td>

After adding this attribute it still does not display correct.  It is still vertically centered.  How can I fix this so that my data is at the top of the cell?

Is it also possible to put this in my stylesheet?

Thanks.
Brendan

2 Answers, 1 is accepted

Sort by
0
Accepted
Alex Gyoshev
Telerik team
answered on 27 Sep 2010, 07:56 AM
Hello Brendan,

You can adjust the vertical align using the following rule:

div.t-grid td {
    vertical-align: top;
}

And yes, it is recommended that you place such styles in the stylesheet.

Kind regards,
Alex Gyoshev
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
0
Brendan Vogt
Top achievements
Rank 1
answered on 27 Sep 2010, 09:09 AM
Thank you.
Tags
Grid
Asked by
Brendan Vogt
Top achievements
Rank 1
Answers by
Alex Gyoshev
Telerik team
Brendan Vogt
Top achievements
Rank 1
Share this question
or