1. #1
    Ext User
    Join Date
    Sep 2009
    Posts
    17
    Vote Rating
    0
    denizkaan is on a distinguished road

      0  

    Post How to render different icons for the tree nodes according to the depth of nodes?

    How to render different icons for the tree nodes according to the depth of nodes?


    Hi,

    I have a tree to display, which is populated using a loader. This tree has maximum depth of three, such that, any node can be a root node (the only level-0 node), or a level-1 node (that is the child of the root node), or level-2 node (that is child of any level-1 node). My problem is that, I would like nodes to have one of the three icons according to their level. Can somebody help me? Any suggestion is appreciated.

    Suppose that I have defined icon classes in some css. I do not want to supply cls attribute in JSON. Maybe some code like this may help me:

    tree.on('load', function(node)
    { var children = node.childNodes;
    for (var i = 0; i < children.length; i++)
    {
    var n = children[i];

    // change icon based on level.
    // what code here ???
    // ....
    // ....
    }
    }, this);


    Thank you!
    Last edited by denizkaan; 23 Sep 2009 at 6:06 AM. Reason: typo

  2. #2
    jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    Frederick MD, NYC, DC
    Posts
    16,353
    Vote Rating
    80
    jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all

      0  

    Default


    why do it on the client side!? do it on the server side!

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..."