1. #1
    Sencha User
    Join Date
    Dec 2011
    Posts
    64
    Vote Rating
    0
    wasima is on a distinguished road

      0  

    Default Grid not populated properly

    Grid not populated properly


    Hi all,
    I have an extjs grid, i have a simulator in the back end which is sending 4 rows of data to grid, but grid is displaying only 3 rows. I am using the same simulator to export the grid contents , that time all the 4 rows are getting exported , but grid is showing only 3 rows .The simulator is sending data perfectly fine .Can somebody help me?


    thanks,

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    8,927
    Vote Rating
    443
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    Can you show the data that is returned? Is the omitted record always the same record? Is there garbage is the record that would cause this to happen?

    If you create 4 manual records to test, do you get the same behavior?

    Regards,
    Scott

  3. #3
    Sencha User
    Join Date
    Dec 2011
    Posts
    64
    Vote Rating
    0
    wasima is on a distinguished road

      0  

    Default


    Name Type Serial number Part number Manufacturer Installed on
    Fan Tray 2 GXX3500 Fan Tray, Front to Back Airflow 345 10 na today
    Fan Tray 1 GXX3500 Fan Tray, Front to Back Airflow 346 20 na today
    Fan Tray 0 GXX3500 Fan Tray, Front to Back Airflow 347 30 na today
    Power Supply 0 JPSU-650W-AC-AFI 0322 40 na today
    These are the contents that i have in backend , but i am getting only these 3 in the grid:
    Name Type Serial number Part number Manufacturer Installed on
    Fan Tray 1 GXX3500
    Fan Tray, 346
    Front to Back
    Airflow
    20 Not Available
    Fan Tray 0 GXX3500
    Fan Tray, 347
    Front to Back Airflow
    30 Not Available
    Power Supply 0 JPSU-650W-AC-AFI 40 Not Available
    The 3 rows i am getting on the grid are not same always, sometimes i get fantray0,fantray1 and power supply 0 and sometimes fantray0,fantray2and powersupply 0....The data keeps changing in the grid, but limited to only 3 rows.

    The alignment i showed above is not proper but focus is on number of rows.......4 in backed just 3 in grid , those 3 are not fixed but keep varing .

    Thanks.

  4. #4
    Sencha User
    Join Date
    Jan 2008
    Posts
    45
    Vote Rating
    -1
    netslayer is an unknown quantity at this point

      0  

    Default


    Im having a similar issue with grids. I populate them manually and have them hidden by default. Then a user shows them. I'm using the fit layout on the panel and when the grid appears it shows only 4 rows. when I call a panel.doLayout() it resizes correctly and I see all 5 rows. It is definitely a bug -- not sure if this is a similar setup to yours

  5. #5
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    8,927
    Vote Rating
    443
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    Thank you for the extra information, but I would looking for your response JSON set back from the server and also provide you model/proxy/store configuration.

    Regards,
    Scott.

  6. #6
    Sencha User
    Join Date
    Dec 2011
    Posts
    64
    Vote Rating
    0
    wasima is on a distinguished road

      0  

    Default


    Model is:

    Ext.define ('fv.model.QfNodeFrus', { extend: 'Ext.data.Model'
    ,fields: ['id', 'name','fruType','serialNum','partNum','manufacturer', 'installedOn']
    });

    Store is:
    Ext.define('fv.store.Inventory.NodeFruGridStore', {
    /* extends class Ext.data.Store */
    extend : 'Ext.data.Store'
    ,model : 'fv.model.QfNodeFrus'
    ,autoLoad: true
    ,proxy : {
    type: 'ajax'
    /* data retreived from inventory servlet */
    ,api : {
    read: 'InventoryServlet'
    }
    , extraParams : {
    inventoryclass : 'QfNodeFru'
    , id : ''
    }




    /* reader type json */
    ,reader : {
    type: 'json'
    }
    }
    });

    I load different set of data depending on selection ...

    nodeFruStore.getProxy().extraParams.inventoryclass = 'QfNodeFru';
    nodeFruStore.getProxy().extraParams.id = deviceId;

    deviceId is generated based on a selection made.
    if deviceId is ED3687,
    The json returned is :

    [{"id":1,"name":"Fan Tray 1","nodeId":"dcfnode-ED3687","fruType":"QFX3500 Fan Tray, Front to Back Airflow","serialNum":"Not Available","partNum":"Not Available","installedOn":"Not Available","manufacturer":"NA"},{"id":2,"name":"Fan Tray 0","nodeId":"dcfnode-ED3687","fruType":"QFX3500 Fan Tray, Front to Back Airflow","serialNum":"Not Available","partNum":"Not Available","installedOn":"Not Available","manufacturer":"NA"},{"id":3,"name":"Fan Tray 2","nodeId":"dcfnode-ED3687","fruType":"QFX3500 Fan Tray, Front to Back Airflow","serialNum":"Not Available","partNum":"Not Available","installedOn":"Not Available","manufacturer":"NA"},{"id":1,"name":"Power Supply 0","nodeId":"dcfnode-ED3687","fruType":"JPSU-650W-AC-AFI","serialNum":"0149","partNum":"740-032091","installedOn":"Not Available","manufacturer":"NA"}]As u can see 4 rows are sent by server , but only 3 are getting populated in grid.The grid is defined as shown: var nodeFruGrid = Ext.create('Ext.grid.Panel', {
    store : nodeFruStore
    ,id : nodeFruGrid
    ,height: fvConstants.fruGridHeight
    ,width : fvConstants.fruGridWidth
    ,title : ''
    /* defines columns of the node fru grid */
    ,columns: [


    {
    text : 'Device name'
    ,width : fvConstants.fruColumn1Width
    ,sortable : true
    ,hideable : false
    ,dataIndex: 'name'


    }
    ,{
    text : 'Device Type'
    ,sortable : true
    ,hideable : false
    ,width : fvConstants.fruColumn2Width
    ,dataIndex: 'fruType'
    }
    ,{
    text : 'Serial Number'
    ,sortable : true
    ,hideable : false
    ,width : fvConstants.fruColumn3Width
    ,dataIndex: 'serialNum'
    }
    ,{
    text : 'Part Number'
    ,sortable : true
    ,hideable : false
    ,width : fvConstants.fruColumn4Width
    ,dataIndex: 'partNum'
    }
    ,{
    text : 'Manufacturer'
    ,sortable : true
    ,hideable : false
    ,width : fvConstants.fruColumn5Width
    ,dataIndex: 'manufacturer'
    }
    , {
    text : 'Installed On'
    ,dataIndex: 'installedOn'
    ,width : fvConstants.fruColumn6Width
    }


    ]
    });

  7. #7
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    8,927
    Vote Rating
    443
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    At first glance, you need to make sure your JSON is formatted correctly:

    Code:
    {
        success: true,
        data: [
            {id_user: 1, user_name: 'ADMIN',  ... },
        ]
    }
    You will also need to setup your reader to access these properties:

    Code:
    root: 'data',
    successProperty : 'success',
    totalProperty   : 'total',
    successProperty : 'success',
    ...
    Regards,
    Scott

  8. #8
    Sencha User
    Join Date
    May 2012
    Posts
    1
    Vote Rating
    0
    Hari_haran is on a distinguished road

      0  

    Default


    i don't think so scottmartin, becoz he is getting data from backend and more over he can able to populate 3 records in grid, In wasima json construction i can able to see duplicate in Id attribute, i hope this make bug !!!! there is two record for an id 1...

    Thanks
    Hariharan

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi