Dave
Dave

Reputation: 2586

Get the jqGrid colModel

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.

Upvotes: 16

Views: 19653

Answers (2)

Justin Ethier
Justin Ethier

Reputation: 134167

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...

Upvotes: 22

Dave
Dave

Reputation: 2586

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

this.p.colModel

Upvotes: 1

Related Questions