Forum
November 2nd, 2014
A
A
A
The forums are currently locked and only available for read only access
Topic RSS
TreeGrid work with asp.net mvc2
26/08/2010
11:38
11:38
k24
Member
Members
Forum Posts: 11
Member Since:
18/08/2010
18/08/2010
Offline
Hi, I use jqgrid with asp.net mvc. There is a problem when I working with treegrid in adjacency model.Jquery version is 1.4.2 jquery UI is 1.8.2 and jqGrid version is 1.7.2
My script is like this:
$(function(){
jQuery("#treegrid").jqGrid({
treeGrid: true,
treeGridModel: 'adjacency',
ExpandColumn: 'name',
url: '/Test/TestTreeGrid/GetTreeData',
datatype: "json",
mtype: "POST",
colNames: ["id", "Account" ],
colModel: [
{ name: 'id', index: 'id', width: 1, hidden: true, key: true },
{ name: 'name', index: 'name', width: 180 }
],
height: 'auto',
pager: "#ptreegrid",
caption: "Treegrid example"
});})
And when first load the root data ,the server code is like this :
var jsonData = new {
total = 1,
page = 1,
records = 1,
rows = new[] {new {id=1,cell= new[] {"1","cash", "0", "Null", "false", "false" } }}
};
JsonResult jsresult= Json(jsonData,JsonRequestBehavior.AllowGet);
return jsresult;
but I got a error "a.rows is undefined" jquery.jqGrid.js (line 52 ).
Any help will be appreciated
Forum Timezone: Europe/Sofia
Most Users Ever Online: 715
Currently Online:
38 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