I'm using dataUrl to acquire the select options, and I need to have the server response depend on which row of the grid is being edited. But there doesn't seem to be any way to communicate that row information in the GET of the select options.
I tried modifying the column option dataURL parameter in formatCell, but that doesn't work properly. The problem seems to be that in the jqGrid editCell function, the column options are copied (via $.extend) into the local “opt” variable before the call the formatCell. This copy is then eventually passed to createEl. Thus no changes made to the column options within formatCell affect the editing of the current column.
The simple fix, I think, is to move the line in editCell:
var opt = $.extend({}, $t.p.colModel[iCol].editoptions || {} ,{id:iRow+”_”+nm,name:nm});
to place it after the call to formatCell. (I haven't tested that, though.)
Another solution would be to provide a mechanism to extend the parameters passed to the server.
By the way, I think this is also the source of the problem reported in the topic named “jqGrid dynamic select option.”
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top