tonytomov / jqGrid

jQuery grid plugin
www.trirand.com
2.84k stars 1.2k forks source link

config “ coloptions ” is invalid parameter #1052

Closed hp3423 closed 7 months ago

hp3423 commented 7 months ago

when "colMenu" is true , "coloptions" is invalid.

So I see the source code, I find an error on line 5058. 微信截图_20231208171827

"coloptions" is not in "cm". I think the correct code should be

cm = ts.p.colModel[index], op = $.extend({sorting:true, columns: true, filtering: true, seraching:true, grouping:true, freeze : true}, ts.p.coloptions),

tonytomov commented 7 months ago

Hello,

coloptions should in colModel property and not as common one. See this example

hp3423 commented 7 months ago

Thanks.

Can we add a common parameter,like "colOptions",or we must modify "coloptions" on every column . The code like this: cm = ts.p.colModel[index], op = $.extend({sorting:true, columns: true, filtering: true, seraching:true, grouping:true, freeze : true},ts.p.colOptions, cm.coloptions),

tonytomov commented 7 months ago

We have grid option called cmTemplate, where you can add common options for all colModel items. See docs for this

hp3423 commented 7 months ago

Thanks,I got it