Get help with testing, discuss unit testing strategies etc.


Post by satishkn »

Apologies if it is a repeat question -

we have specified an 'itemid' for the treegrid in the treepanel.Initially when the tree is displayed in the panel, it is collapsed.
How do I select the expander icon without using movemouseby(...) so I can show the children?

Also in the grid, we are using checkbox selection model. So, to select a row in grid, we have to select the checkbox (to select the row). How do I select the checkbox without using movemouseby(....). For the checkbox selection, I don't think we can specify any itemid/id (so we cant use extjs's componentquery() to search the same).

Your thoughts & suggestions are appreciated in advance.
-Satish

Post by mats »

Why not use the Tree/NodeInterface? Just get the parent node, then call expand() on it. Same for the grid, why not call select on the selection model?

Post by satishkn »

Thanks - will try out and keep you posted about the progress.

Hope I am not asking for too much, but high level pseudo code or url to an example would help.
Thanks,
-satish

Post by jakub »

It really should be trivial :
    var node = treepanel.getRootNode().findChild("id",TreeNodeId, true);
    node.expand();
[code]

reference in the docs : https://docs.sencha.com/ext-js/4-0/#!/api/Ext.data.NodeInterface-method-expand
JavaScript/Angular/ExtJS consulting - kuba@virtualdesign.pl

Post Reply