jqGrid docs for tree grid say: "Currently jqGrid can work only with data returned from server. There are some tricks and articles wich describes how to work with local data."
Fair enough, but I was unable to find such articles. Any hints on how I can achieve it, preferably with equivalent of datatype=local
?
Probably this old answer could help you. The demo which used the last current version of jqGrid you can find here.
UPDATED: Now I would be prefer to use
datatype: "jsonstring"
which is almost the same asdatatype: "local"
. One need to usedatastr: mydata
instead ofdata: mydata
in the case. Additionally one have to use jsonReader as function. As the result one will have the following modified demo.The corresponding code of the demo you find below
UPDATED 2: One should use
parent:"null"
orparent:null
instead ofparent:""
.