TreeGrid expand all & collapse all

We have to do a expand all and colapse all functionality. The data that is displayed is coming from the database. In order to achieve this I have tried couple of approaches,

  1. Added opne=“1” tag in the xml. In this approach on load, only last child of a parnet is getting opened and this keeps continuing.

  2. Added


In this case collapse all works fine, but expand all doesn’t work fine initaly, but the moment you expand all the nodes and then do a collapse all, then expand all works fine, i.e to do expand all the html data has to be generated alredy.

Any help will be apprecited

  1. Added opne=“1” tag in the xml. In this approach on load, only last child of a parnet is getting opened and this keeps continuing.
    Unfortunately the issue cannot be reproduced locally. Pleas,e make sure that each row in your tree grid has a unique id.

  2. Added

collapseAll
Please, try t o call the expandAll()/collapseAll() methods after the data is loaded to the grid. [code]treegrid.load(url,function(){ treegrid.expandAll() })[/code] or [code]treegrid.attachEvent("onXLE", function(){ treegrid.expandAll() }); [/code]

If issues still occurs for you, please, provide with a sample your code with the init of the grid.