Thanks Saravanan for your help.
Hi,
i'm working on an grid with server side paging and enablePersitence. (I'm binding the Datasource with ".Datasource(ds.URL("/controller/datasource").Adaptor("UrlAdaptor")))
Everything works as expected, except the current page number is not stored/restored.
What i'm trying to do:
1) I have a grid which contains a list of items.
2) when the user clicks on an item, the user will be directed to a details view of the item, where the user may modify the item etc.
3) when the user navigates back without providing the pagenumber, the filter/sorting is correctly restored, but not the current page.
Question: Is it possible to restore the "current" page without providing the page=123 parameter in the redirect url?
(MVC 5 with Grid)
thanks in advance,
Klaus
<ej-grid id="MasterGrid" allow-paging="true" enable-persistence="true" allow-filtering="true" allow-sorting="true">
<e-datamanager adaptor="UrlAdaptor" url="Home/DataSource"></e-datamanager>
. . .
</ej-grid>
[Controller]
public ActionResult DataSource([FromBody]Syncfusion.JavaScript.DataManager dm)
{
IEnumerable Data = GetAllRecords();
Syncfusion.JavaScript.DataSources.DataOperations operation = new Syncfusion.JavaScript.DataSources.DataOperations();
if (dm.Sorted != null && dm.Sorted.Count > 0) //Sorting
{
Data = operation.PerformSorting(Data, dm.Sorted);
}
if (dm.Where != null && dm.Where.Count > 0) //Filtering
{
Data = operation.PerformWhereFilter(Data, dm.Where, dm.Where[0].Operator);
}
int count = Data.AsQueryable().Count();
if (dm.Skip != 0)
{
Data = operation.PerformSkip(Data, dm.Skip);
}
if (dm.Take != 0)
{
Data = operation.PerformTake(Data, dm.Take);
}
return Json(new { result = Data, count = count });
} |