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

[Solved] Grid Lines

2 Answers 28 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.
Shalini
Top achievements
Rank 1
Shalini asked on 13 Jun 2011, 10:51 AM
Hi,

         I am using Telerik Grid For Asp.Net MVC 3 Razor Application. I have a requirement to show my grid lines ie lines of horizantal and vertical lines in grid.Kindly let me know on how to do it programatically.Also i need to know on how to align the text in a column based on its content ie if i have a string or an integer value it must be left alligned and if i have a decimal or a float column it must be right alligned...

Kindly let me know on how to do it programatically..


Thanks,

Shalini Jennifer.W

2 Answers, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 13 Jun 2011, 12:18 PM
Hi Shalini,

Content alignment can be set by using CSS classes or inline styles, defined with HtmlAttributes for the column. This is quite similar to the discussion about HeaderHtmlAttributes in your other forum thread.

As for the borders, this can be accomplished with HtmlAttributes or with external CSS (as in the example below). Why do you want to do this programmatically?

.t-grid  tr  td ,
.t-grid  tr  td.t-last
 {
    border: 1px solid red;
}


Regards,
Dimo
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
Vipin
Top achievements
Rank 1
answered on 24 Jul 2012, 01:45 PM
Hi Dimo,

How to achieve column alignment i.e., For numeric column 'text-align:right' and for string 'text-align:left' ?
I want to acheive it through external css only,not by inline style.

Thanks,

Vin
Tags
Grid
Asked by
Shalini
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Vipin
Top achievements
Rank 1
Share this question
or