Add a new column object in colModel using push (if at end) or splice (if in middle)
colModel.push( { title: "yyy", dataIndx: "xxx", width : n } );
and call
$grid.pqGrid( "refreshDataFromDataModel" );
$grid.pqGrid ( "refresh" );
Hi,
Thanks for your response.
I try it on my page. But still have problem.
As I understanding, I need to get the all colModel array then I can push new column in it. Is that right?
I use the following code:
var colModel = $( ".selector" ).pqGrid( "option", "colModel" );
var title=colModel[0].title;
But when I get the "colModel" and try to get some attributes about this object, I will see the following error:
Cannot read property 'title' of undefined.
I'm sure I import "pqgrid.min.js" on my page.
So do you know why this happened? Do I make any mistake for these codes?
Thank you!