I am trying to take off the pagination from a couple of Telerik MVC Grids that have a large amount of data loaded into them (upwards of 5000, probably more once they hit production). With our smaller grids, I would just take off the Pageable property(see code below) and the scrolling functionality just works.
With the larger grids I get a JSON error saying that the length of the string exceeds the value set on the maxJsonLength property. I updated the webconfig to be set to the max value as per this links suggestion but it still gave me the same error.
The version of Telerik that I am using is plain Telerik(not Kendo) and is the MVC version (main UI DLL is Telerik.Web.MVC, version 2012.2.801.340).
All documentation that I have found either points me to the new version of Kendo or a RadGrid, which is not included/supported in my version.
Is there a way to acheive this, either by loading it all at once like this does here, or creating a dynamically loading grid using the Telerik version I have, or am I out of luck? I am also open to suggestions for another way to achieve this, but the results have to be in a Grid of some sort.
Below is the basic code for what I have for all grids. The larger grids that I am having issues with have more columns than this one which help account for the JSON error.
@(Html.Telerik().Grid<ApportionmentCode>()
                .DataBinding(dataBinding => dataBinding.Ajax().Select("AjaxGetAppCodes", "AppCode"))
                .Name("Grid")
                .Columns(columns =>
                {
                    columns.Bound(o => o.Id)
                           .Title("ID")
                           .Width(50)
                           .HtmlAttributes(new { @class = "text-center" })
                           .Hidden();
                    columns.Bound(o => o.Code)
                           .Title("AppCode")
                           .Width(90)
                           .HtmlAttributes(new { @class = "text-center" });
                    columns.Bound(o => o.Description)
                           .Title("Description")
                           .HtmlAttributes(new { style = "min-width: 200px;" })
                           .ClientTemplate("<span class=\"clip tooltip\"><#= Description #></span>");
                    columns.Command(commands =>
                    {
                        commands.Custom("edit")
                                .Text("Edit")
                                .ButtonType(GridButtonType.Image)
                                .Action("Edit", "AppCode")
                                .ImageHtmlAttributes(new { @class = "t-edit", title = "Edit" })
                                .DataRouteValues(route => route.Add(o => o.Id));
                    })
                    .Width(78)
                    .HtmlAttributes(new { @class = "nowrap" })
                    .IncludeInContextMenu(false);
                })
                .ToolBar(commands => commands.Custom()
                                             .Text("Add")
                                             .Action("Create", "AppCode", Request.GetRouteValues())
                                             .ButtonType(GridButtonType.ImageAndText)
                                             .ImageHtmlAttributes(new { @class = "t-add" })
                                             .HtmlAttributes(new { @class = "addButton" }))
                .Filterable()
                .ClientEvents(events =>
                                {
                                    events.OnDataBound("onDataBound");
                                    events.OnComplete("AddGridFilter");
                                    events.OnLoad("OnGridLoad");
                                })
                .ColumnContextMenu()
                .Sortable()
                .Pageable(paging => paging.PageSize(20).Style(GridPagerStyles.NextPreviousAndNumeric).Position(GridPagerPosition.Bottom)) //When removed, this is the line that causes the JSON error
                .Resizable(resizing => resizing.Columns(true))
                .Scrollable(a => a.Height("auto")))
Thanks in advance
 
     
    