I have a requirement where i need to dynamically increase or decrease Jqgrid column .I have multiple buttons like One,Three,Seven,One Month etc.These buttons denotes days and same i need to add as column names in Jqgrid dynamically.
Here is the pic of the design..
Now as per the picture ,if i click on current
only one column should be visible ,if click on One Day
two columns should be visible and similarly if click on Month
thirty columns should be dynamically generated.
Here is my JQgrid sample code that i am referring..
grid.jqGrid({
datatype: "local",
data: mydata,
colNames:['Room No', '12', '13','14','15','16'],
colModel:[
{name:'Room No',index:'Room No', width:42, align:'center'},
{name:'',index:'', editable:true, align:'center'},
{name:'',index:'', editable:true, align:'center'},
{name:'',index:'', editable:true,align:'center'},
{name:'',index:'', editable:true,align:'center'},
{name:'',index:'', sortable:false,align:'center'}
],
Please help me..