This is a migrated thread and some comments may be shown as answers.
MVC Grid Column scroll
1 Answer 7 Views
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jillian
Top achievements
Rank 1
Jillian asked on 21 May 2013, 04:09 PM
How can I get a Column of my MVC Telerik Grid to be a specific width and scroll horizontally for any overflow OR to break specifically on a comma character? 

I have a very long string of numbers separated by a comma (no spaces) that is pushing the width of my grid and specifically that column  way out. I tried to add this to my column, which adds the horizontal scroll bar, but the width is being ignored.  I have 4 more columns after this long column and I would like the whole grid to display on the page without a horizontal page scroll

.HtmlAttributes(New With {.Style = "width:150px;overflow-x:scroll;"}).Width(150)


1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 22 May 2013, 12:12 PM
Hello Jillian,

Table cells cannot be scrollable on their own. I suggest you to use column templates with scrollable <div>s.

http://demos.telerik.com/aspnet-mvc/grid/templatesserverside

http://demos.telerik.com/aspnet-mvc/grid/templatesclientside

On a side note, setting width to table cells via HtmlAttributes is not recommended. Only use .Width() for the column, if needed.


Regards,
Dimo
Telerik
Check out the successor of Telerik MVC Extensions - Kendo UI for ASP.NET MVC - and deem it for new ASP.NET MVC development.
Tags
Grid
Asked by
Jillian
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or