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.