1. #1
    Sencha User
    Join Date
    May 2010
    Posts
    1
    Vote Rating
    0
    dark-cms is on a distinguished road

      0  

    Question Unanswered: Content in Border-Layout moves up on click

    Unanswered: Content in Border-Layout moves up on click


    I've created a Borderlayout with region west and center.
    Region West contains a Tree and Region Center a Grid.

    The Grid has a empty Store which load Records from a Contentstore after clicking on a Treeitem.
    This all works fine, but if i click on a Grid-Item, the Grid-container moves up (round-a-bout 20px up)

    The Treepanel will be created by this code.
    Code:
    var cent=  Ext.create('Ext.tree.Panel', {        width: 300,
            store: store,
            border: false,
            autoScroll: true,
            region:'west',
            layout: 'fit',
            rootVisible: false,
            listeners: {
    
    
        itemclick: {
            fn: function(view, record, item, index, event) {
                nodeId = record.data.id;
                var user = cstore.findRecord("id", nodeId);
                border_layout.setTitle(record.data.text);
                if(user) {
                    var Xstore_data = user.products();
                     the_grid.getStore().loadRecords(Xstore_data.getRange(0,Xstore_data.getCount()),{addRecords: false});
                } else {
                    the_grid.getStore().loadRecords(Xstore2.getRange(0,Xstore2.getCount()),{addRecords: false});
                    
                }
            }
        }
    
    
    }
    On Itemclick the GridStore will load the new Content

    The Grid will be created with this code:
    Code:
    var the_grid = Ext.create('Ext.grid.Panel', {    store: Xstore,
        layout: 'fit',
        region: 'center',
        autoScroll: true,
        columns: [
            { header: 'Name',  dataIndex: 'name' },
            { header: 'ID', dataIndex: 'id', flex: 1 }
        ]
    });
    The Code to create the Layout is, it contains the above elements as items:
    Code:
    var border_layout = Ext.create('Ext.panel.Panel', {    autoScroll: false,
        height: 400,
        layout: 'border',
        items: [the_grid,cent],
        renderTo: 'cccore'
    });
    Those anyone now this problem?
    The following image is after a tree-element was clicked , the grid has received the new Products and the layout looks fine
    onclick_tree.jpg

    The following Image shows the layout after clicking on a grid element. As we can see the grid and the tree moved up
    onclick_grid.jpg
    Attached Images
    Last edited by dark-cms; 27 Oct 2011 at 1:45 AM. Reason: images added

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