Forum
23:16
26/02/2010
I am running jquery 1.3.2 and jqgrid 3.6.4 via FF 3.6 and seem to be seeing consistent handling of sub-objects. In the following example, the data is properly loaded via the addJSONData, but the sub-object grid columns are not being properly updated in the subsequent calls to setRowData and addRowData. Any suggestions?
jQuery("#list4").jqGrid({
jsonReader: { repeatitems : false, id: "0" },
datatype: "json",
height: 250,
colNames:['Inv No',
'Date',
'Client',
'Amount',
'Tax',
'Total',
'Notes'],
colModel:[ {name:'id',index:'id', width:60, sorttype:"int"},
{name:'invdate',index:'invdate', width:90, sorttype:"date"},
{name:'name',index:'name', width:100},
{name:'sub.amount',index:'sub.amount', width:80, align:"right",sorttype:"float"},
{name:'sub.tax',index:'sub.tax', width:80, align:"right",sorttype:"float"},
{name:'sub.total',index:'sub.total', width:80,align:"right",sorttype:"float"},
{name:'note',index:'note', width:150, sortable:false} ],
caption: "Manipulating Array Data"
});
jQuery('#list4')[0].addJSONData({"page":"1","total":2,"records":"13","rows":[{"id":"13","invdate":"2007-10-06","name":"Client 3","sub":{"amount":"1000.00","tax":"0.00","total":"1000.00"},"note":null},{"id":"12","invdate":"2007-10-06","name":"Client 2","sub":{"amount":"700.00","tax":"140.00","total":"840.00"},"note":null},{"id":"11","invdate":"2007-10-06","name":"Client 1","sub":{"amount":"600.00","tax":"120.00","total":"720.00"},"note":null},{"id":"10","invdate":"2007-10-06","name":"Client 2","sub":{"amount":"100.00","tax":"20.00","total":"120.00"},"note":null},{"id":"9","invdate":"2007-10-06","name":"Client 1","sub":{"amount":"200.00","tax":"40.00","total":"240.00"},"note":null},{"id":"8","invdate":"2007-10-06","name":"Client 3","sub":{"amount":"200.00","tax":"0.00","total":"200.00"},"note":null},{"id":"7","invdate":"2007-10-05","name":"Client 2","sub":{"amount":"120.00","tax":"12.00","total":"134.00"},"note":null},{"id":"6","invdate":"2007-10-05","name":"Client 1","sub":{"amount":"50.00","tax":"10.00","total":"60.00"},"note":null},{"id":"5","invdate":"2007-10-05","name":"Client 3","sub":{"amount":"100.00","tax":"0.00","total":"100.00"},"note":"no tax"},{"id":"4","invdate":"2007-10-04","name":"Client 3","sub":{"amount":"150.00","tax":"0.00","total":"150.00"},"note":"no tax"}]});
jQuery("#list4").jqGrid('setRowData',13,{"id":"13","invdate":"2010-03-02","name":"Modified","note":"setRowData","sub":{"amount":"333.00","tax":"222.00","total":"444.00"}});
jQuery("#list4").jqGrid('addRowData',15,{"id":"15","invdate":"2010-03-02","name":"Added","note":"addRowData","sub":{"amount":"444.00","tax":"333.00","total":"555.00"}});
19:09
Moderators
30/10/2007
Hello,
This is true and I will not refer this as bug, but rather as asking a feature.
The behaviour is described here:
http://www.trirand.com/jqgridw.....ed_methods
Also we will try to improve it according to your requirments.
Best Regsrds
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
Most Users Ever Online: 715
Currently Online:
47 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