Get the jqGrid colModel

2020-06-08 13:27发布

问题:

How can I get the entire colModel for a jqGrid element? I've gone through the source code a bit and also played around with some tests, but nothing seems to return the actual array.

Thanks.

回答1:

You can use getGridParam - just pass the colModel option:

jQuery("#mygrid").jqGrid ('getGridParam', 'colModel');

You can look at the jqGrid docs for getGridParam for more information...



回答2:

So I did figure it out. In the custom navigation button (onClickButton function), I just used :

this.p.colModel


标签: jquery jqgrid