Get TreePanel child nodes count

  1. #1

    Get TreePanel child nodes count

    Hi,

    I am trying to get count of child nodes of the first child node of the treepanel.

    <ext:TreePanel ID="treePanel" runat="server" Width="250" RootVisible="false"
        Lines="false" EnableViewState="true" ViewStateMode="Enabled" >
    </ext:TreePanel>
    I can get the value using the below javascript code:

    #{treePanel}.getRootNode().childNodes[0].childNodes.length
    Is there anyway i can access the same from server side code?

    Thanks.
    Last edited by Daniil; Dec 13, 2012 at 3:41 PM. Reason: Please use [CODE] tags
  2. #2
    Hi @Maitreya,

    Welcome to Ext.NET forums!

    No, there is no way to access it on a server. But you can send it as an extra parameter of a DirectEvent or a DirectMethod.
  3. #3
    Hi @Daniil,

    Thanks for the reply! I have used the same workaround for now.

    Cheers,
    Maitreya

Similar Threads

  1. [CLOSED] Check child nodes treepanel
    By Antonio09 in forum 2.x Legacy Premium Help
    Replies: 4
    Last Post: Jan 30, 2013, 12:29 AM
  2. Blocking load child nodes with dbclick of treegrid row
    By Thiago Nogueira in forum 1.x Help
    Replies: 1
    Last Post: Nov 29, 2010, 12:42 PM
  3. [CLOSED] Unselect child nodes of an AsyncTreeNode in javascript
    By deejayns in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Nov 23, 2010, 6:03 PM
  4. How to expand all child nodes for current node?
    By dbassett74 in forum 1.x Help
    Replies: 2
    Last Post: May 26, 2009, 2:53 PM
  5. How do I clear out a child nodes from a TreeNode?
    By dbassett74 in forum 1.x Help
    Replies: 3
    Last Post: May 26, 2009, 1:39 PM

Tags for this Thread

Posting Permissions