I'm working on a jqGrid/bbq extension to integrate jqGrid paging with browser history. Works pretty well, but I don't like the design.
I wrote a jqGridWithHistory function that the user calls. This returns a grid with the history extension. So instead of calling:
$(“#foo”).jqGrid(opts);
You call:
$(“#foo”).jqGridWithHistory(opts);
Instead.
It would make more sense to me to make the history integration an option, e.g.:
$(“#foo”).jqGrid({ url: url, history: true, … });
But I can't find an extension point in the grid source code which would allow this.
Essentially, I need to fiddle with the options before the grid is loaded, so that I can modify page, rowNum, and the like, if need be, and hook gridComplete. $.jgrid.default won't work because it's overwritten by options.
What would be ideal for me is if I could (inside my plugin) do something like:
$.jgrid.extend(“beforeCreate”, function() {
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top