"All" option doesn't display all

4 posts, 0 answers
  1. Joe
    Joe avatar
    220 posts
    Member since:
    May 2012

    Posted 07 Jun 2017 Link to this post

    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.

     

  2. Martin
    Admin
    Martin avatar
    833 posts

    Posted 09 Jun 2017 Link to this post

    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.
  3. Joe
    Joe avatar
    220 posts
    Member since:
    May 2012

    Posted 09 Jun 2017 in reply to Martin Link to this post

    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?

  4. Martin
    Admin
    Martin avatar
    833 posts

    Posted 13 Jun 2017 Link to this post

    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.
Back to Top