Forum
09:13
18/12/2008
Right now we define columns for grid like below
colNames:['Inv No','Date', 'Amount','Tax','Total','Notes'],
colModel :[
{name:'invid', index:'invid', width:55},
{name:'invdate', index:'invdate', width:90},
{name:'amount', index:'amount', width:80, align:'right'},
{name:'tax', index:'tax', width:80, align:'right'},
{name:'total', index:'total', width:80, align:'right'},
{name:'note', index:'note', width:150, sortable:false} ]
I want to define these colNames and colModel dynamically. Adding rows is easy but how to do this?? Is there any solution for this..
Thanks for reply
13:42
18/12/2008
Hi Veda,
From what I have read there is no explicit support for dynamic colnames/colmodel but you could build them using something like PHP or ASP and using $.ajax to pull the strings to the clientside.
I am currently working on this myself and have had some success in using PHP to build the arrays required and them passing them to js for inclusion in the jqGrid definition.
Tony would be best to confirm but I believe there is jqGrid support planned in version 3.4?
Hope this Helps
Dave
Most Users Ever Online: 715
Currently Online:
55 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66