Results 1 to 3 of 3

Thread: get tree panel sub-menu

  1. #1

    Default Answered: get tree panel sub-menu

    Hi,

    How can I get specific sub-menu from accordion menu.



    ex:

    var rootNode ={
    id
    :'root',
    text
    :'Root Node',
    expanded
    :true,
    children
    :[
    {
    id
    :'c1',
    text
    :'Child 1',
    leaf
    :true
    },
    {
    id
    :'c2',
    text
    :'Child 2',
    leaf
    :true
    }]
    }




    when I click on the child, it open a grid inside a tabpanel,
    I need to change the text 'Child 1' to 'Child test' when I click on the tab Child 1.



    best regards

  2. You can find the clicked tree node, it will return you the model where you can change the text so it will also update the text in the tree node. It will be something like below, I am changing text of first tree node -

    treePanel.getRootNode().firstChild.set('text', 'Text Changed');

  3. #2
    Sencha User
    Join Date
    Oct 2018
    Location
    Noida
    Posts
    67
    Answers
    10

    Default

    You can find the clicked tree node, it will return you the model where you can change the text so it will also update the text in the tree node. It will be something like below, I am changing text of first tree node -

    treePanel.getRootNode().firstChild.set('text', 'Text Changed');

  4. #3

    Default

    thanks, it works perfectly.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •