1. #1
    Sencha User
    Join Date
    Mar 2010
    Posts
    245
    Vote Rating
    1
    Ex_Soft is an unknown quantity at this point

      0  

    Default [4.2.0beta] Ext.grid.plugin.BufferedRenderer && layout

    [4.2.0beta] Ext.grid.plugin.BufferedRenderer && layout


    Code:
    Ext.define("TestModel", {
        extend: "Ext.data.Model",
        idProperty: "id",
        fields: [
            { name: "id", type: "int" },
            { name: "name", type: "string"  }
        ]
    });
    
    Ext.onReady(function() {
        var
            maxRecordsCount = 500,
            pageSize = 25,
            createData = function(max) {
                var
                    data = [];
    
                for(var i=0; i<max; ++i)
                    data.push( { id: i, name: "Record# "+i } );
    
                return data;
            },
            store = Ext.create("Ext.data.Store", {
                model: "TestModel",
                pageSize: pageSize,
                data: createData(maxRecordsCount),
                proxy: {
                    type: "memory"
                }
            });
    
        grid = Ext.create("Ext.grid.Panel", {
            //height: 400,
            layout: "fit",
            store: store,
            columns: [
                { dataIndex: "id", header: "id" },
                { dataIndex: "name", header: "name" }
            ],
            plugins: "bufferedrenderer",
            renderTo: Ext.getBody()
            //renderTo: Ext.get("divVictim")
        });
    });
    Grid doesn't show data. May I use layout?

  2. #2
    Sencha User skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,341
    Vote Rating
    249
    skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of

      0  

    Default


    It's not usually recommended to put a layout on a grid panel as it doesn't have children in the sense of a standard container. What are you trying to achieve?

  3. #3
    Sencha User
    Join Date
    Mar 2010
    Posts
    245
    Vote Rating
    1
    Ex_Soft is an unknown quantity at this point

      0  

    Default


    Quote Originally Posted by skirtle View Post
    What are you trying to achieve?
    I've resolved my issue using anchor:
    Code:
    Ext.create("Ext.window.Window", {
    ...
       height: 500,
       layout: "fit",
       items: [Ext.create("Ext.form.Panel", {
       ...
          items: [{
              xtype: "textfield"
          }, {
              xtype: "textfield"
          },
          Ext.create("Ext.grid.Panel", {
          ...
          anchor: "100% -50",
          ...
          })
          ]
       ...
       })]
    ...
    });

Thread Participants: 1

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