I'm using NA 2011.2 with latest SR, C#, MVC3, IE8
I'm a little concerned with the performance of the jquery grid. In my case, I have a datasource with thousands of records. I've also added paging. However, even though I'm only looking at 50 records at a time, fiddler shows that I'm actually recieving the FULL number of records returned from the database.
At the same time, if I go to the next page of items, another re-fetch of ALL the data takes place, just to get the next 50 records. It seems less than efficient.
Surely I'm not doing something right. Is this the correct behaviour or is there something I can do to optimize this.
Thanks,Tony
Hi Angel,
I agree. I did change my code to all local (sorting, paging, filtering) yesterady and at least that is saving on the massive round trips.
However, to test how the remote would work, I changed them back today and I'm still getting the entire dataset back to the client.
My grid has the following options set:
features.Paging().PageSize(50).Type(OpType.Remote);features.Sorting().Mode(SortingMode.Single).ApplyColumnCss(false).Type(OpType.Remote); features.Filtering().Mode(FilterMode.Advanced).Type(OpType.Remote);
my datasouce function in the controller looks something like this:[GridDataSourceAction]public ActionResult GetAccountItems(int id){ var items = from i in db.items where ... return View(Details.AsQueryable());}
Thanks for taking a look,
Tony
Hi Tony,
this is certainly not the desired behavior. i would like to see your code before i make any comments, because it could be anything. if the whole data is sent, maybe your paging is configured as "Local" instead of remote.
Thanks,
Angel
Well, I hate answering my own questions because I feel silly that I asked it in the first place.
However, perhaps this will help someone else.
I found the information needed to make sorting, paging, and filtering all local by using the "type" option. Here's an example using for MVC3 Razor:features.Paging().PageSize(50).Type(OpType.Local);features.Sorting().Mode(SortingMode.Single).ApplyColumnCss(false).Type(OpType.Local); features.Filtering().Mode(FilterMode.Advanced).Type(OpType.Local);