Results 1 to 6 of 6

Thread: See node properties in a tree panel from a grid

  1. #1

    Default See node properties in a tree panel from a grid

    Hi guys,

    I have a tree panel with several nodes which I identify by the property node.id, thsi is in the west panel, in the east panel i have agrid with several buttons.
    What I want to do is, when i click a button and a node and a row in teh grid is selected then an action is done.

    I dont know how to handel this...I gues with handlers maybe...I dont know...someone to help me??...some example??

    thanks

  2. #2
    Sencha User Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,245

    Default

    Your button handler obviously needs a reference to the grid and to the tree.

    The easiest method is to give both the grid and the tree and id and use:
    Code:
    var grid = Ext.getCmp('id-of-grid');
    var tree = Ext.getCmp('id-of-tree');

  3. #3

    Default

    I tried what you say...but it doesnt work...all the coponent i create i do like this:

    this.component= new component

    Maybe this is the problem??? cause I want to get the component that I create from a component which is created by this...I mean the son want to get the father..

  4. #4
    Sencha User Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,245

    Default

    I meant:
    Code:
    var grid = new Ext.grid.GridPanel({
      id: 'id-of-grid',
      ...
    });
    var tree = new Ext.grid.TreePanel({
      id: 'id-of-tree',
      ...
    });
    var button = new Ext.Button({
      ...
      handler: function(){
        var grid = Ext.getCmp('id-of-grid');
        var tree = Ext.getCmp('id-of-tree');
      }
    });

  5. #5

    Default it works

    thank you it works...but...how can i get the node id...I mean I have the element tree, and this elemente have several nodes...and one is selected...how can I get the node id which is selected

    thanks

  6. #6
    Sencha User Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,245

    Default

    Code:
    var node = tree.getSelectionModel().getSelectedNode();
    var record = grid.getSelectionModel().getSelected();

Similar Threads

  1. How to find occurence of a tree node in a tree panel?
    By mrinaljena in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 9 Nov 2009, 9:34 PM
  2. Setting Node properties while loading tree from Json File
    By rafaymirza in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 23 Jun 2009, 9:25 AM
  3. tree panel - this.wrap has no properties
    By ljschrenk in forum Ext 2.x: Help & Discussion
    Replies: 15
    Last Post: 9 Dec 2008, 7:09 AM
  4. Replies: 0
    Last Post: 6 May 2008, 4:23 AM
  5. tree dragdrop: node properties
    By Dextro in forum Ext 2.x: Help & Discussion
    Replies: 3
    Last Post: 14 Mar 2007, 12:18 PM

Posting Permissions

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