This is a migrated thread and some comments may be shown as answers.

"All" option doesn't display all

3 Answers 17 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Joe
Top achievements
Rank 1
Joe asked on 07 Jun 2017, 05:21 PM

I have an MVC app, with a Grid in it.  It pulls it's data via ajax from an MVC Controller that reaches out to a restful API to retrieve it's data.  All along the "All" option has worked fine, but the number of records has been steadily increasing.  Now it's a little over 5000 records, and the "All" option no longer shows all of them.

In the Controller, after pulling the data from the restful API, the data is indeed all there before returning it to the grid via a DataSourceRequest.  In the browser console I see an error stating it's a 500 server error.

Is there a limit on how many records the grid can deal with?  5000 surely seems like a small number...  

Here is my controller code, which is feeding the grid:

[HttpPost]
       [ActionName("DocumentSearchResults")]
       public ActionResult DocumentSearchResults([DataSourceRequest] DataSourceRequest request, bool unMatchedOnly, string docketNumber, string employeeId, string ssnNumber, string lastName, string firstName, string caseID, string garnishType, string clientId, string miscNotes, string startDate, string endDate)
       {
           GarnishmentDocumentSearch docSearch = new GarnishmentDocumentSearch()
           {
               UnMatchedOnly = unMatchedOnly,
               DocketNumber = docketNumber,
               EmployeeId = employeeId,
               SSNNumber = ssnNumber,
               LastName = lastName,
               FirstName = firstName,
               CaseId = caseID,
               GarnishType = garnishType,
               ClientId = clientId,
               StartDate = !string.IsNullOrEmpty(startDate) ? DateTime.Parse(startDate) : DateTime.MinValue,
               EndDate = !string.IsNullOrEmpty(endDate) ? DateTime.Parse(endDate) : DateTime.MinValue,
               MiscNotes = miscNotes
           };
 
           List<UploadedDocument> response = WebApiHelper.CallPostAPI<List<UploadedDocument>, GarnishmentDocumentSearch>($"{_garnishAPI}DocumentSearch", docSearch);
           return Json(response.ToDataSourceResult(request), JsonRequestBehavior.AllowGet);
       }

 

As I said, the response object contains all the records no problem, and again I reiterate, it worked fine until the record count hit 5000.  Several days ago, when it was still about 2900 records, the "All" option worked as expected.

 

3 Answers, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 09 Jun 2017, 02:00 PM
Hello,

I suspect that you have hit a restriction of the size of JSON response imposed by the MVC framework. Please review this forum thread that lists some possible solutions.

Regards,
Martin
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Joe
Top achievements
Rank 1
answered on 09 Jun 2017, 04:16 PM

For the time being, I removed the "All" option from the grid.  It's already using AJAX, and using a DataSourceRequest type in the MVC controller itself.  I didn't necessarily want the component to connect directly to the RESTful API, using the MVC controller for any additional data manipulation and validation required.  It's just one of the standards we enforce at our company, go through the MVC controller instead of directt o the API..

It's odd that the MVC controller can get all the data just fine from the API, but when passing it to the component that there's this limit.  Is there a way to overcome that limit?

0
Martin
Telerik team
answered on 13 Jun 2017, 03:01 PM
Hello,

I understand your frustration about this issue, but as stated previously this is a limitation of the MVC framework and not in Kendo. Based on that I am afraid that the only solution to this framework limitation is to ensure that the data you send from the controller doesn't hit the limit. As already suggested in the forum thread from my previous post, 2 possible options are paging and virtualization of the returned data.

I hope this helps.

Regards,
Martin
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Grid
Asked by
Joe
Top achievements
Rank 1
Answers by
Martin
Telerik team
Joe
Top achievements
Rank 1
Share this question
or