Results 1 to 3 of 3

Thread: Change a Tree Node's Text not working - Extjs 4.1.0

  1. #1
    Sencha User
    Join Date
    Jul 2012
    Posts
    22
    Answers
    2

    Default Answered: Change a Tree Node's Text not working - Extjs 4.1.0

    Hi,
    how do i change the selected tree node text? below line doesn't work.

    node.setText('abc');

    Thanks in advance

    regards,
    Ibrahim

    PS: I cannot see any method inside node interface to change a node text -- http://docs.sencha.com/ext-js/4-0/#!...rty-childNodes

  2. Hi ibrahimp,

    Try this code -

    Code:
     listeners:{
            select:function(rModel, rec, index, eOpt){
                rec.set('text', 'ibrahimp');
            }
        },
    Working sample example http://jsfiddle.net/93R2c/

    Also see http://docs.sencha.com/ext-js/4-1/#!...del-method-set

  3. #2
    Sencha User sword-it's Avatar
    Join Date
    May 2012
    Location
    Istanbul
    Posts
    1,335
    Answers
    124

    Default use set() method of Ext.data.Model

    Hi ibrahimp,

    Try this code -

    Code:
     listeners:{
            select:function(rModel, rec, index, eOpt){
                rec.set('text', 'ibrahimp');
            }
        },
    Working sample example http://jsfiddle.net/93R2c/

    Also see http://docs.sencha.com/ext-js/4-1/#!...del-method-set
    sword-it.com, Sencha Developer House in Turkey - Istanbul University Technopark Suite 204.

  4. #3
    Sencha User
    Join Date
    Jul 2012
    Posts
    22
    Answers
    2

    Default

    Thanks

Tags for this Thread

Posting Permissions

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