This question is locked. New answers and comments are not allowed.
Hi.
I'm trying to create a Grid in MVC3 with razor and VB.NET. The normal Grid works fine, sorts and paginates fine (but it doesn't show filter options and it doesn't show the arrows to paginate when displaying the items, what do I need?), but when I try to make the Ajax binding, I get an error 500 - internal server error when I try to paginate.
What am I doing wrong?
This is my controller:
Function Index() As ViewResult Return View(Me.orgRepository.GetOrgs()) End Function
<GridAction()>
Function AjaxGrid() As ActionResult
Return View(New GridModel(Of hdmtORG)() With
{
.Data = Me.orgRepository.GetOrgs()
})
End Function
This is my View:
@Code 'declare the grid and enable features Dim grid = Html.Telerik().Grid(Model) _ .Name("Grid") _ .Pageable() _ .Sortable() _ .Filterable() _ .DataBinding(Function(dataBinding) dataBinding.Ajax.Select("AjaxGrid", "Org")) 'Add grid columns grid.Columns(Function(columns) columns.Bound(Function(o) o.orgNAME).Width(200)) grid.Columns(Function(columns) columns.Bound(Function(o) o.orgIMAGE).Width(200)) grid.Columns(Function(columns) columns.Bound(Function(o) o.orgUNIT).Width(200)) 'Render the grid grid.Render() End code Thank you for your help.