If paging option is enabled for DataTable, servere-side code throws an ArgumentException:
Limit must have a non-negative value.
It happens because of takeCount parameter. Value of the takeCount parameter obtained from pageSize DataTables query parameter which is negative (i.e. -1) when pagination is disabled.
If
paging
option is enabled for DataTable, servere-side code throws anArgumentException
:It happens because of
takeCount
parameter. Value of thetakeCount
parameter obtained frompageSize
DataTables query parameter which is negative (i.e.-1
) when pagination is disabled.queryable.Skip(skipCount).Take(takeCount).ToList()
How to fix: handle negative values of
pageSize
query parameter.