PDA

View Full Version : treepicker multi select



sinaalizadeh
20 Nov 2014, 5:35 AM
Hey there

Is there any way to select multiple nodes in a treepicker like in combobox?

joel.watson
20 Nov 2014, 7:17 PM
Hey there

Is there any way to select multiple nodes in a treepicker like in combobox?

Hi sinaalizadeh--

Out of the box this is not supported. You could, however, extend the treepicker to create your own that implements support for selection of multiple nodes.

Thanks!

sinaalizadeh
21 Nov 2014, 1:00 AM
thanks joel. Can you please give me an example or a hint how I can start doing it? I haven't done something like this and I'm not an expert in js

joel.watson
21 Nov 2014, 2:38 PM
thanks joel. Can you please give me an example or a hint how I can start doing it? I haven't done something like this and I'm not an expert in js

Hi sinaalizadeh--

The best place to start is to dive into the source of the existing Ext.ux.TreePicker class (you can click on the class name in the docs to open the source file).

First, become familiar with how this code works...for example, what happens, in the existing code, when a tree node is selected? Where is the picker hidden? And so on.

Next, create a new class which extends the existing tree picker and begin to experiment with the changes that you'd like to add.

Hope this helps you get started!