Results 1 to 4 of 4

Thread: Tree store renders outside of tree panel

  1. #1
    Sencha User
    Join Date
    Apr 2017
    Posts
    2

    Default Tree store renders outside of tree panel

    Dear ExtJS developers

    Hi, I am trying to define a grid panel along with model and store to load a json file, and a tree panel along with tree store, then I try to render both of them into a normal panel with filter on the left and tree on the right.

    The store data of both get load, however, the tree store was loaded outside of the normal panel, and part of the grid panel is covered by the bank tree panel. And I think there is some problem in rendering the tree panel.

    This is the code:
    https://fiddle.sencha.com/#view/editor&fiddle/2dcr

    Please help, thanks !

  2. #2
    Sencha User Jad's Avatar
    Join Date
    Feb 2012
    Location
    annecy france / geneve suisse
    Posts
    149
    Answers
    12

    Default

    Hy,

    Like that it works better :-)


    Code:
    Ext.application({
        name: 'Fiddle',
        launch: function() {
            var gridstore = Ext.create('Clara.Documents.Store', {});
            var filterstore = Ext.create('clara.DocFltr.store',{});
            
            Ext.create('Ext.Panel', {
                renderTo: Ext.getBody(),
                height:350,
                layout:'border',
                title:'Protocol Documents',
                items: [
                    Ext.create('Clara.Documents.GridPanel', {
                        store:gridstore,
                        region:'center'
                    }),
                    Ext.create('Clara.Documents.FilterPanel', {
                        store:filterstore,
                        region:'west'
                    })
                ]
            });
        }
    });

  3. #3
    Sencha User
    Join Date
    Apr 2017
    Posts
    2

    Default

    Hi, Jad

    Thank you for your reply. However, is there any way I could define the tree panel, and panel first, then render the tree panel into panel when I create them? I am required to write this way. Thanks

  4. #4
    Sencha User Jad's Avatar
    Join Date
    Feb 2012
    Location
    annecy france / geneve suisse
    Posts
    149
    Answers
    12

    Default

    Code:
    Ext.define('Clara.Documents.Panel', {
    	extend: 'Ext.Panel',
    	height:350,
    	//alias:'widget.',	
    	layout:'border',
    	title:'Protocol Documents',
    	initComponent: function(){
    	var me = this;
    	
    me.items = [
    		{
    			xtype:'DocGrid',
    			region:'center',
    			store: me.gridstore
    		},
    		{
    			xtype:'DocFilter',
    			region:'west',
    			anchor:'20%',
    			store: me.filterstore
    		}
    	];
    	
    	me.callParent();
    	}
    	
    });
    
    
    Ext.application({
        name: 'Fiddle',
        launch: function() {
            var gridstore = Ext.create('Clara.Documents.Store', {});
    
    
    
    
           var filterstore = Ext.create('clara.DocFltr.store',{});
            
            Ext.create('Clara.Documents.Panel',{
                gridstore: gridstore,
                filterstore: filterstore,
                renderTo: Ext.getBody()
            })
        }
    });

Similar Threads

  1. Replies: 4
    Last Post: 5 Feb 2016, 7:14 AM
  2. Tree panel & Ext.direct tree store
    By zz9pa in forum Ext: Q&A
    Replies: 1
    Last Post: 25 Nov 2013, 3:02 AM
  3. How to load the tree panel tree store with Ajax response.
    By deepak_patil1222 in forum Ext: Q&A
    Replies: 1
    Last Post: 16 Aug 2013, 12:22 PM
  4. Replies: 1
    Last Post: 19 Jul 2013, 1:00 PM
  5. Problems with Tree Store and Tree Panel
    By lambidu in forum Ext: Q&A
    Replies: 5
    Last Post: 5 Nov 2012, 4:30 PM

Tags for this Thread

Posting Permissions

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