1. #1
    Sencha User
    Join Date
    Mar 2013
    Posts
    2
    Vote Rating
    0
    bit8bug is on a distinguished road

      0  

    Default Unanswered: Grid Panel - RowExpander

    Unanswered: Grid Panel - RowExpander


    using the row expander, when I collapse any row, only the first row get expanded (even on I expand row 4 but row 0 get expanded)
    Code:
    Ext.define('Product', {
        extend: 'Ext.data.Model',
        fields: [{
            name: 'username',
            type: 'string'
        }, {
            name: 'name'
        }, {
            name: 'event_type'
        },{
            name: 'date',
            type: 'date',
        }, {
            name: 'data',
            type: 'string'
        }]
    });
        
        var ds = Ext.create('Ext.data.JsonStore', {
                storeId:'simpsonsStore',
                pageSize: itemsPerPage,
                proxy: {
                    type: 'ajax',
                    url: urlt,
                    reader: {
                        type: 'json',
                        root: 'items',
                        idProperty: 'username'
                    }
                },
                model: 'Product',
                autoDestroy: true,
            });
     
        Ext.onReady(function(){
           
            Ext.QuickTips.init();
    
    
            Ext.create('Ext.grid.Panel', {
        
            title: 'Wall',
            store: ds,
            columns: [
                { id:'username', header: "username", width: 75, sortable: true, dataIndex: 'username', filterable: true, filter: {type: 'string', disabled:true} },
                { id:'name', header: "name", width: 150, sortable: true, dataIndex: 'name',  },
                { id:'event_type', header: "event type", width: 100, sortable: true, dataIndex: 'event_type' },
                { id:'date', header: "date", width: 150, sortable: true, dataIndex: 'date' },
                { id:'data', header: "data", dataIndex: 'data', resizable: true, flex: 1, sortable: false },
            ],
            enableLocking: false,
            plugins: [{
                ptype: 'rowexpander',
                rowBodyTpl : new Ext.XTemplate(
                    '<p><b>Comments:</b> {company}</p>',
                {
                    formatChange: function(v){
    
    
                    }
                })
            }],
            
            
            dockedItems: [{
                xtype: 'pagingtoolbar',
                store: ds,   // same store GridPanel is using
                loadMask: true,
                dock: 'bottom',
                emptyText: 'No Matching Records',
                displayInfo: true,
            
            }],
            
            
            collapsible: true,
            animCollapse: true,
            iconCls: 'icon-grid',
            margin: '0 0 20 0',
            renderTo: Ext.getBody()
    });
            
            ds.load({
                params:{
                    start:0,
                    limit: itemsPerPage
                }
            });
    do I need to rerender() the Grid ?

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    8,910
    Answers
    655
    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


    What does your JSON look like? Do you have a unique id field?

    Does our online example work for you?
    http://docs.sencha.com/ext-js/4-2/ex...d-plugins.html

  3. #3
    Sencha User
    Join Date
    Mar 2013
    Posts
    2
    Vote Rating
    0
    bit8bug is on a distinguished road

      0  

    Default


    Yes the example works fine and the json is correct because all the rows get filled
    but my issue is with row expander it will always expand the first row only no matter what I expand !
    do I need to rerender the grid after store load ?
    I have a unique id in json but not in the grid , I'll try to add column for that
    My Issue is solved how can I mark this as answered or delete it ?

Thread Participants: 1

Tags for this Thread

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..."