We are using the MVC grid control with Razor in VB. When I attempt to bind to the grid, I get an exception when one of the date columns that is passed back in the model contains a null. When it doesnt contain a null, then it works fine. I do not want the grid to try to bind this column at all - I do not need it in this view. Is there a way to limit the columns that the grid is trying to use?
I found this entry which seems to address the problem, but I do not see how to apply this in a Razor view. Can anyone help?
Here is the code from my View:
I found this entry which seems to address the problem, but I do not see how to apply this in a Razor view. Can anyone help?
Here is the code from my View:
@(Html.Telerik(). Grid(Model). Name("Grid"). Columns(Sub(columns) columns.Bound(Function(o) o.DocumentId).Width(20) columns.Bound(Function(o) o.StatusCode).Width(20).Title("Status") columns.Bound(Function(o) o.LastName).Width(10).Title("LastName") columns.Template(Function(o) Html.ActionLink("View", "View", New With {.id = o.Id})) End Sub). Pageable. Sortable) )