tonytomov/jqGrid — Issue #209: Add extra parameters to callback dataInit
Author: emielJ
Created: 2011-12-09 14:41:00+00:00
State: open

It would be nice to add the parameters `opt` and `vl` to the callback `dataInit`. This way there is more information available during initialization, including the initial value.

I propose the following changes in `grid.common.js`: Change the beginning of the definition of `bindEv` from

function bindEv(el, opt) {
if ($.isFunction(opt.dataInit)) {
opt.dataInit(el);
}
...
}

into

function bindEv(el, opt, vl) {
if ($.isFunction(opt.dataInit)) {
opt.dataInit(el, opt, vl);
}
...
}

and to add `vl` to all calls to `bindEv`.