PDA

View Full Version : Expand or Collapse a node depending on the state of a sibling node...



sesebas
19 Jun 2017, 8:16 AM
Hi,

I have searched and tried different ways of solving it, but I have not been able to solve this. I appreciate your help to advance my project.

At the beginning of the application:


MyTree_01.on('load',function(){
PasaPorMyPanel_01 = 1;
pasando = 1;

SelDefault = MyTree_01.getStore().getNodeById('MyStartInic');

if (pasando == 1){
CtrlNum = MyTree_01.getRootNode().data.index
}
paramousenter = 1;

MyTree_01.getSelectionModel().select(SelDefault); // Fire Select event

}); //Finish the load of 'MyTree_01'

56481

If I select the "Base de Datos" node or the "Búsqueda por País" node ...

56482

I need that when I select the node "Cuadros comparativos ..." it will expand as in the next image, but it will collapse the node "Search by Country"
56483
I have tried using "beforeDeselect", "deselect", "itemClick" in the listener of my treePanel, but I have not got results. I hope you can help me.


Thank you.

sesebas
20 Jun 2017, 7:52 AM
I can solve it. Thank you anyway