I ended up essentially making two pages: /mypage.php and /mypage.php?notree
then doing:
$(”#mytree”).jqGrid({
…
treeGrid: ,
…
});
Before I populate the graph, I send a request to the server to determine if the results will need a tree or not. Then, if the response indicates that the page needs a tree table but does is currently mypage.php?notree, I do:
window.location = 'mypage.php?tree_data_to_load=foobar';
or if the opposite is the case, I do:
window.location = 'mypage.php?notree?data_to_load=foobar';
Seems to work pretty well.