Just for the record,
I had the same problem and it turned out to be something related to javascript.
in the jquery treegrid adjacency example the xml sends “![CDATA[value]]” as id. It turned out that jqGrid could not find this id as matching the id to be collapsed.
Just changing it to “value” instead of “![CDATA[value]]” solved the issue for me.