Title: [SOLVED] How to stop disableFilter for requesting server's data Post by: angween on July 10, 2015, 03:54:35 PM Hello,
I have a datagrid using queryParams with dynamic variable, like: queryParams:{student:name,id:number}, and i also enable filter on it. I got several problem that i manage to 'trick' but then i've got deadend, this is what i've done and i cant: 1. at first i only 'enableFilter' once, then request data with queryParams with changed variable 'name' and 'number', but always ended with 'uncaught range error maximum call stack size exceeded' on chrome's console. then i just disableFilter before i queryParams and then enable it again after that. Works find and i like it. But this not an elegance way, maybe there is another way for this? 2. then this problem came, every time disableFilter triggered, datagrid will request data from servers, and that makes 2 query with queryParams. How can i prevent this? Thank you Title: Re: How to stop disableFilter for requesting server's data Post by: stworthy on July 10, 2015, 04:54:08 PM The 'datagrid-filter.js' supports remote filtering, just set the 'remoteFilter' property to true. If you got some errors while retrieving data, please provide some code snippets to describe how you call 'enableFilter' and how you post requests to server.
Title: Re: How to stop disableFilter for requesting server's data Post by: angween on July 10, 2015, 10:07:35 PM i tried to jsfiddle, but i dont know....
this is my code, --i made it simple--- Code: <body> thank you Edit: cleaning code Title: Re: How to stop disableFilter for requesting server's data Post by: stworthy on July 10, 2015, 11:59:19 PM Your 'seeDetail' function just does the reloading action, it can be rewritten as:
Code: function seeDetail(id){ Title: Re: How to stop disableFilter for requesting server's data Post by: angween on July 11, 2015, 12:35:47 AM Aww, its simple then i thought, and i kept focusing on queryParams. :D
ok, thank you very much for everythink |