Results 1 to 5 of 5

Thread: Tree node value

  1. #1

    Default Tree node value

    Hi,

    I need to find the node of an selected tree node for droping a row from grid to tree. could anyone tell how i can find node of an tree?

    Cheers,

  2. #2
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,890

    Default

    Find it by it's ID? Handle a click event, a select event? How can we know what you want?

  3. #3

    Default

    var ddtree = new Ext.dd.DropTarget(tree.getEl(), {
    ddGroup : 'myGroup',
    copy : false,
    notifyDrop : function(dd, e, data) {
    if(data.grid != null){
    var row = data.grid;
    var select = data.selections;
    var destination;
    destination = Node id which i need to get ;

    for (var i=0; i<select.length; i++) {
    addRowToTree(destination, row);//this passes the node id and row of grid as parameters to insert a row in tree.
    }
    this.cancelExpand();
    this.removeDropIndicators(this.lastOverNode);
    return true;
    }}
    });

    Now i am stuck up in finding the node id of the selected node.

  4. #4
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,890

    Default

    Format your code, and I'll read it.

  5. #5

    Default

    var dropToTree = new Ext.dd.DropTarget(tree.getEl(), {
    ddGroup : 'a',
    copy : false,
    notifyDrop : function(source, e, data) {
    if (data.grid != null) {
    var row = data.grid;
    var select = data.selections;
    var destination;
    //console.log(this);
    destination = //Node value which i need to call a function
    for (var i = 0; i < select.length; i++) {
    addRowToTree(destination, row); // function call to arrange grid row in tree
    }
    this.cancelExpand();
    this.removeDropIndicators(this.lastOverNode);
    return true;
    }
    }
    });

Posting Permissions

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