I want to add new column on a button click in jqGrid. Following is the code that i am using to define a grid. can someone help me, how to define new columns with position.
jQuery("#list").jqGrid({
datatype: "local",
height: 250,
colNames:['Inv No','Date', 'Client', 'Amount','Tax','Total','Notes'],
colModel:[
{name:'id',index:'id', width:60, sorttype:"int",editable:false,editoptions:{readonly:true,size:10}},
{name:'invdate',index:'invdate', width:90, sorttype:"date",editable:true,editoptions:{readonly:false,size:25}},
{name:'name',index:'name', width:100, editable:true,editoptions:{readonly:false,size:20}},
{name:'amount',index:'amount', width:80, align:"right",sorttype:"float", editable:true, editoptions:{readonly:false,size:20}},
{name:'tax',index:'tax', width:80, align:"right",sorttype:"float", editable:true,editoptions:{readonly:false,size:20}},
{name:'total',index:'total', width:80,align:"right",sorttype:"float", editable:true,editoptions:{readonly:false,size:20}},
{name:'note',index:'note', width:150, sortable:false, editable:true,editoptions:{readonly:false,size:20}}
],
rowNum:10,
rowList:[10,20,30],
sortname: 'id',
viewrecords: true,
sortorder: "desc",
editCaption: "Edit Record",
caption: "Manipulating Grid Data",
editurl:"someurl.php"
});