This question is locked. New answers and comments are not allowed.
I just downloaded 2010.2.825 to see how the grid component works (I'm new to MVC and deciding which grid to use in a new project). But my code doesn't seem to be working for the properties I set. Setting the column's Width() seems to have no effect. I also set the grid height (see http://www.telerik.com/community/forums/aspnet-mvc/grid/grid-default-height.aspx) and this sets the height of the column headers - not the actual grid. Lastly, I have Selectable() set, but I can't select any rows. I click and click and nothing happens.
I seem to be failing on all fronts here. Can you check my code and see where I went wrong? Thanks.
Here is my code:
<%= Html.Telerik().Grid(Model)
.TableHtmlAttributes(new { style = "height:300px" })
.Name("OrdersGrid")
.DataKeys(dataKeys => dataKeys.Add(o => o.SpaceRequestID))
.Columns(columns =>
{
columns.Bound(o => o.SpaceRequestID).Width("50");
columns.Bound(o => o.ContactEmail).Width("200");
columns.Bound(o => o.ContactPhone).Width("500");
})
.Scrollable(x=>x.Enabled(true))
.Selectable()
.Sortable()
%>
I seem to be failing on all fronts here. Can you check my code and see where I went wrong? Thanks.
Here is my code:
<%= Html.Telerik().Grid(Model)
.TableHtmlAttributes(new { style = "height:300px" })
.Name("OrdersGrid")
.DataKeys(dataKeys => dataKeys.Add(o => o.SpaceRequestID))
.Columns(columns =>
{
columns.Bound(o => o.SpaceRequestID).Width("50");
columns.Bound(o => o.ContactEmail).Width("200");
columns.Bound(o => o.ContactPhone).Width("500");
})
.Scrollable(x=>x.Enabled(true))
.Selectable()
.Sortable()
%>