Very Simple Ajax Modification

May 26, 2014 at 9:03 AM
Hello.
Me and my friend modified this library a little bit to make it more "ajax"
Modification ensures that only grid div is refreshed on paging and filtering. No extra modifiactions in code required. This is very simple. We just replaced window.location with ajax call. and on each request we are reinitializing grid.
It works. Is it very clean? Well I'm not sure.
Json transport would be probably more effective.

Well. I cant attach a files so :
http://pastebin.com/L90np31y
http://pastebin.com/e9C5TfhL

Basicaly you have to just replace gridmvc.js and _Grid.cshtml
You also need to remove gridmvc.min.js
Coordinator
May 31, 2014 at 4:11 PM
Hi,

Looks ok.

But you don't need to use custom container div (<div id="gridDiv" >), use current grid container:
this.jqContainer.load(document.URL +"?"+ initialUrl + url + " .grid-mvc", initGrid);
Also, if multiple grids on the page, after loading markup - you need to filter DOM elements by data-gridname attribute.
Jun 15, 2014 at 6:08 PM
Hi
Could you share like which places you modify? So it will work for future patch as well instead of just putting in the whole file like now. Thanks.