I have a basic treegrid with 2 levels, and I want some rows hidden and others visible; I do this with $("#" + rowId).hide() and $("#" + rowId).show() programatically, as which rows are visible is dependent on data outside the grid. That part works fine.
However, when I collapse a node and then expand it, all children are visible, even those I hid. Evidently, jqGrid is pretty much just doing .hide() and .show() on the rows, which negates my settings. So my thought is to add a hidden field in each row that stores whether it should be visible or not, and then re-hide/show after the expand event. The problem is, I'm not sure how to catch the event and execute code immediately after it.
Oleg shows a method for catching the events here: jqGrid treeGrid catch expand collaps events
Unfortunately, that doesn't work for me because it will just override whatever hide/show I do there. I need to execute code after the jqGrid functions. Any ideas on how to do this?