Results 1 to 2 of 2

Thread: How to count the number or records present in the TreePanel

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Sencha User
    Join Date
    Jun 2012
    Vote Rating

    Default How to count the number or records present in the TreePanel

    Hi Sencha,I am using a TreePanel where we show the records in the treepanel on the button submission. I want to get the number of records present in tree. I am unable to fetch this. My code below:
    var QryInfoTreePanel = new Ext.tree.TreePanel({
            autoHeight: true,
            id: 'queryInfoTreePanel',
            enableDD: false,
            singleExpand: true,
            dataUrl: '/Administration/AdhocQryInfo/AdhocQryInfoTree', 
           rootVisible: false,
            root: { id: 'root', nodeType: 'async' }, 
           title: 'Adhoc Query',
            listeners: { 
               click: function (node, e) { 
                   if (node.leaf) {
                        qryID =; 
                       if (qryID < 0) {
                       else { 
                            //adhocQryParamStore.load({ params: { iQryId: 1} }); 
                        }                }
                }        }
    and on the button clicking                 
    Ext.getCmp('queryInfoTreePanel').getLoader().dataUrl = '/Administration/AdhocQryInfo/AdhocQryInfoTree?sQryTypeSd=' + qryTypeValue + '&sQryRptCategorySd=' + reportCategoryValue;                Ext.getCmp('queryInfoTreePanel').getRootNode().reload();
    I am able to see therecords in the tree but how i count the records. i am not getting the proper method for that.Please helpThanks in advance.
    Last edited by sword-it; 26 Jul 2012 at 3:16 AM. Reason: put your sample code in proper place

Posting Permissions

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