1. #1
    Sencha User
    Join Date
    Oct 2012
    Posts
    6
    Vote Rating
    0
    midodjo is on a distinguished road

      0  

    Default Unanswered: edit tree node

    Unanswered: edit tree node


    How to edit a child node of a Ext.tree.panel(Extjs.tree.panel)???

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,118
    Answers
    3504
    Vote Rating
    855
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    More info please.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Oct 2012
    Posts
    6
    Vote Rating
    0
    midodjo is on a distinguished road

      0  

    Default respense

    respense


    when i double click in a node in tree i want to edit the text of the node

  4. #4
    Touch Premium Member
    Join Date
    Jun 2011
    Posts
    1,092
    Answers
    112
    Vote Rating
    95
    Farish is a glorious beacon of light Farish is a glorious beacon of light Farish is a glorious beacon of light Farish is a glorious beacon of light Farish is a glorious beacon of light

      0  

    Default


    on itemdblclick event of the tree panel, you can create e.g. a popup where the new text can be entered. or if you already have the text, you can do the following:

    Code:
    var node = tree.getSelectionModel().getSelection()[0];  // get selected node
    node.set('text', newText);
    where newText is the variable containing the text string which you want to display in your tree node.

Thread Participants: 2