How To Have Custom Formatter Built-in Function To Call A Non-jqgrid Seperate Function?
I'm wondering how to have jqGrid custom formatter to call a seperate function, 'test1'? I get an undefined error on the 'test1' function. Script #1... //colModel json objects... {
Solution 1:
I recommend you to use approach described in the answer and in this one. You don't need to bind onclick
to some global method. Instead of that it's more effective to use beforeSelectRow
or onCellSelect
callback which will be called inside of one existingclick
event handle.
By the way, the formatter which you posted could don't work because the format of rowObject
depend on many things: how you fill the grid, which datatype
you use ("local"
, "json"
or "xml"
can produce different format of rowObject
), whether you use repeatitems: true
or some other settings of jsonReader
, whether you use loadonce
or not and so on.
Post a Comment for "How To Have Custom Formatter Built-in Function To Call A Non-jqgrid Seperate Function?"