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

[Solved] Grid Header Text

3 Answers 173 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.
Casey
Top achievements
Rank 1
Casey asked on 12 Jul 2011, 09:12 PM
With my grid the header text is too long to stay within the pixel amount I've allocated, Can I changes the .title string text to be on two lines instead of one?

So the grid looks like this in the header:                              Instead of this: 
                                                                I love                                             I love Telerik
                                                               Telerik



cols.Bound(Function(x) x.strTesting).Title("This line needs to be split into two because of it length").Width(40)
               So basically add a line break in the middle of the text here ^

Thanks In Advance

3 Answers, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 13 Jul 2011, 06:40 AM
Hello Casey,

The following forum thread suggests how to achieve the desired look:

http://www.telerik.com/community/forums/aspnet-mvc/general/how-to-wrap-column-text-of-grid-asp-net-mvc2.aspx

Regards,
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
Rajesh
Top achievements
Rank 1
answered on 16 Mar 2012, 04:24 PM
Hey Dimo,

I figured that a neater solution is to change the t-grid-header to use t-header-wrap class instead of t-header class. I checked it by changing the class  in the browser. However, i am unable to figure out how the achieve the same using code/css.

-rajesh
0
Dimo
Telerik team
answered on 16 Mar 2012, 04:41 PM
Hello Rajesh,

The classes that you have mentioned are used by the Grid scripts, so fiddling with them may lead to unexpected results. I don't recommend using this approach.

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
Casey
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Rajesh
Top achievements
Rank 1
Share this question
or