Open jsuske1985 opened 4 years ago
Solved It:
def.Paging = true;
def.ItemsPerPage = 25;
def.MaxItemsPerPage = 25;
def.RetrieveData = (context) =>
{
var options = context.QueryOptions;
var result = new QueryResult<DepositLog>();
var query = _modelItems.AsQueryable();
result.TotalRecords = query.Count();
if (options.GetLimitOffset().HasValue)
{
query = query.Skip(options.GetLimitOffset().Value).Take(options.GetLimitRowcount().Value);
}
result.Items = query.ToList();
return result;
};
Hello,
I am trying to add paging to my grid, but its not appearing or limiting my results....here is my code:
And my view:
@Html.MVCGrid("DepositLogGrid")
What am I doing wrong?