I'm having a problem with the o_item.select() method for items where the depth is greater than 1.
I'm using the code from openItemByCaption, with modification to select the found item.
It works fine if the item's n_depth is less than 2, but at depth 2 it returns the error 'Object doesn't support this property or method'.
I've also tried o_tree.select(o_item.n_id) with the same results.
Am I missing something obvious?
Documented openItemByCaption function openes item's parent nodes before select it - so it should not cause the error. If you removed some
functionality make sure the item is inited before call it's select method
var o_state = o_item.state();
To init the item you should open all its parents. See API examples.
I was selecting the item before the parent node was opened. I moved the select() call after this and now it's just fine!