1. #1
    Sencha User
    Join Date
    Sep 2010
    Posts
    46
    Answers
    1
    Vote Rating
    3
    gfrancis1@gmail.com is on a distinguished road

      0  

    Default Unanswered: Tree View - referring to Nodes programatically

    Unanswered: Tree View - referring to Nodes programatically


    I have defined a TreeView, and when it gets rendered to the HTML page, the first element is a DIV with the id of my TreeView:

    Code:
    <div id="levelTreePanel" class="x-panel x-tree-panel x-tree-lines x-grid x-grid-header-hidden x-panel-default" style="height: 120px; width: 320px; " role="presentation">
    ...
    </div>
    There are some nested DIVs under that, with Id's like 'treeview-xxxx' and 'ext-genxxxx'
    Then there's a TABLE
    In cells of the table are Divs that render each of the Nodes in my Tree data.
    I would like to be able to reference these Divs that represent my Nodes from Javascript, but the generated Node-Divs don't have Ids at all. I've tried assigning 'id' attributes to the nodes of the Tree data, but these don't get rendered anywhere on the resulting HTML.

    Is there a way to get the framework to assign Id values to the Nodes of the tree?

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    35,672
    Answers
    3354
    Vote Rating
    747
    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


    What are you actually trying to accomplish?
    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 - Community Support Team
    Join Date
    Jan 2012
    Posts
    1,376
    Answers
    346
    Vote Rating
    109
    vietits is a name known to all vietits is a name known to all vietits is a name known to all vietits is a name known to all vietits is a name known to all vietits is a name known to all

      0  

    Default


    Try this:
    Code:
    function getDivRef (nodeId){ // nodeId is record Id
        var divRef = null;
        var node = treeStore.getNodeById(nodeId);
        node = treePanel.getView().getNode(node);
        if(node){
            divRef = Ext.fly(node).down('div');
        }
        return divRef;
    }

Thread Participants: 2

Tags for this Thread

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar