Forum


10:08

Hi everybody
I'm developping a web application with Java, Springframework, DWR and JQuery.
My first grid was successful.
datatype: 'jsonstring',
userdata: mydata,
colNames:[
'<spring:message code="label"/>',
'<spring:message code="label"/>'
],
colModel:[
{ name:'field1', index:'field1', sortable:true, sorttype:'int' },
{ name:'field2', index:'field2', sortable:false }
],
emptyrecords: "<spring:message code="label"/>",
hoverrows: true,
toolbar: [true, "bottom"],
width: 653,
height: 300
});
<c:forEach var="item" items="${listAsJson}" varStatus="status">
<c:choose>
<c:when test="${status.last}">
${item}
</c:when>
<c:otherwise>
${item},
</c:otherwise>
</c:choose>
</c:forEach>
];
$("#sortable").addRowData(i+1,mydata[i]);
}
But now I need some sub grids.
The problem is, that I don't know, how to add the rows into the sub grid. I still have all datas in the response (I'm looking for the datas in the previous Spring-Controller and add them into the request).
The second question is about json. I have objects in objects. The json string looks ok, or doesn't it?
But if I change the ColModel to:
{ name:'address.street', index:'address.street' }
],
I don't get any results.
It makes me ... :S
Best regards
Arne
01:53

Moderators
30/10/2007

Hello,
http://www.trirand.com/jqgridw.....id#methods
One note (which I will correct into the docs)
If you use subGridJson you should use the method this way:
var mygrid = jQuery("#mygrid")[0];
mygrid.subGridJson(arraydata,rowid)
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.
01:56

Moderators
30/10/2007

Hello,
About the second question.
The addRowData currently does not support this. I suggest you to use datatype as function - see docs and addJSONData method to add data. This method support this named convention.
Regards
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:
28 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