[CLOSED] Select all tree panel nodes

  1. #1

    [CLOSED] Select all tree panel nodes

    I need to add a link "Select All" to the topbar of tree panel and on click of it, it should select all the nodes of treepanel.
    How can i do that in MVC.

    Please let me know
    Last edited by Daniil; Sep 05, 2013 at 5:36 AM. Reason: [CLOSED]
  2. #2
    Hi @PriceRightHTML5team,

    First of all you should define
    .Mode(SelectionMode.Multi)
    for a TreePanel's SelectionModel, because it is Single by default.

    Then, to select all the nodes you can call this JavaScript code:
    App.TreePanel1.getSelectionModel().selectAll()
    http://docs-origin.sencha.com/extjs/...thod-selectAll
  3. #3
    Right now my treepanel doesn't have any selection model and i can still select multiple nodes.
    Can you please provide me the snippet for setting the selctionmodel for treepanel.

    Thanks
  4. #4
    If so, then you probably do not need to set up Multi mode. Did you try the selectAll method?
  5. #5
    Quote Originally Posted by Daniil View Post
    If so, then you probably do not need to set up Multi mode. Did you try the selectAll method?

    Its not working .It just rolls through all the nodes but keep the selection as it is.
    I think the Selection mode is "Single" .How do we set it to Multiple
    Last edited by PriceRightHTML5team; Aug 30, 2013 at 10:44 AM.
  6. #6
    If it is Single, you should not be able to select the only node.

    OK, to set up Multi mode, you should define this for a TreePanel:
    .SelectionModel(Html.X().TreeSelectionModel().Mode(SelectionMode.Multi))

Similar Threads

  1. Replies: 4
    Last Post: Mar 08, 2013, 4:16 PM
  2. [CLOSED] Expanding Tree Nodes in Behind Code
    By taylorjp2000 in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jul 11, 2012, 6:00 PM
  3. Loading Tree panel nodes from code behind
    By sumesh in forum 1.x Help
    Replies: 2
    Last Post: May 20, 2011, 12:00 PM
  4. [CLOSED] Search/Highlight Tree Nodes
    By rthiney in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Dec 04, 2009, 3:24 PM
  5. [CLOSED] Tree Nodes Alignment
    By Etisbew in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Aug 25, 2009, 2:03 PM

Tags for this Thread

Posting Permissions