1. #1
    Sencha User
    Join Date
    Oct 2009
    Posts
    57
    Vote Rating
    2
    Answers
    1
    oturkan is on a distinguished road

      0  

    Default Answered: rowexpander extjs 4.2.1.883

    Answered: rowexpander extjs 4.2.1.883


    Hi,

    I'm using RowExpander but this line (nextBd = row.down(me.rowBodyTrSelector, true)) is null. Because there is no row in html.

    help me. thanks

    Code:
    initComponent: function () {
            var me = this;               
            var storeFields = new Array();
    
    
            me.gridInfo = Ext.decode(AjaxHandler.GetGridJSon(me.initialConfig.code).value);
            me.actionMenu = Ext.create('Ext.menu.Menu',
                                        {
                                            items: me.gridInfo.ContextMenu,
                                            listeners: {
                                                click: function (menu, item, e, eOpts) {
                                                    me.contextmenuclick(menu, item, e, eOpts);
                                                }
                                            }
                                        });
    
    
            this.addEvents('contextmenuclick');
    
    
            for (var i = 0; i < me.gridInfo.Columns.length; i++) {
                storeFields.push({ name: me.gridInfo.Columns[i].dataIndex });
            }
    
    
            Ext.define('SearchThread', {
                extend: 'Ext.data.Model',
                fields: storeFields,
                idProperty: me.gridInfo.SearchPropertyId
            });
    
    
            me.columns = me.gridInfo.Columns;
            me.store = Ext.create('Ext.data.Store', {
                pageSize: parseInt(me.gridInfo.PageSize),
                model: 'SearchThread',
                proxy: {
                    type: 'ajax',
                    url: me.gridInfo.SearchUrl,
                    reader: {
                        type: 'json',
                        root: 'Rows',
                        totalProperty: 'totalCount'
                    }
                }
            });
    
                me.plugins = [{
                    ptype: 'rowexpander',
                    rowBodyTpl: new Ext.XTemplate(
                        '<p><b>Company:</b> {CustomerCode}</p>',
                        '<p><b>Change:</b> {FirstName}</p><br>',
                        '<p><b>Summary:</b> {LastName}</p>'
                    )
                }];
    
            me.store.load({ params: { start: 0, limit: parseInt(me.gridInfo.PageSize) } });
    
    
            me.callParent();

  2. I have fixed the problem. It' my mistake. I set grid height : '100%'. That's why giving error.

    thank you

  3. #2
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    6,062
    Vote Rating
    215
    Answers
    486
    slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of

      0  

    Default


    Hmm.. not sure how to help, yet. I tried with a test grid in 4.2.1 with the plugin from your code and I didn't see any errors.

    Code:
    Ext.create('Ext.data.Store', {
        storeId:'simpsonsStore',
        fields:['name', 'email', 'phone'],
        data:{'items':[
            { 'name': 'Lisa',  "email":"lisa@simpsons.com",  "phone":"555-111-1224"  },
            { 'name': 'Bart',  "email":"bart@simpsons.com",  "phone":"555-222-1234" },
            { 'name': 'Homer', "email":"home@simpsons.com",  "phone":"555-222-1244"  },
            { 'name': 'Marge', "email":"marge@simpsons.com", "phone":"555-222-1254"  }
        ]},
        proxy: {
            type: 'memory',
            reader: {
                type: 'json',
                root: 'items'
            }
        }
    });
    
    
    Ext.create('Ext.grid.Panel', {
        title: 'Simpsons',
        store: Ext.data.StoreManager.lookup('simpsonsStore'),
        columns: [
            { text: 'Name',  dataIndex: 'name' },
            { text: 'Email', dataIndex: 'email', flex: 1 },
            { text: 'Phone', dataIndex: 'phone' }
        ],
        height: 200,
        width: 400,
        renderTo: Ext.getBody(),
        plugins: [{
            ptype: 'rowexpander',
            rowBodyTpl: new Ext.XTemplate(
                '<p><b>Company:</b> {CustomerCode}</p>',
                '<p><b>Change:</b> {FirstName}</p><br>',
                '<p><b>Summary:</b> {LastName}</p>'
            )
        }]
    });


    Are you a Sencha products veteran who has wondered what it might be like to work at Sencha? If so, please reach out to our recruiting manager:
    sheryl@sencha.com

  4. #3
    Sencha User
    Join Date
    Oct 2009
    Posts
    57
    Vote Rating
    2
    Answers
    1
    oturkan is on a distinguished road

      0  

    Default thanks for replay

    thanks for replay


    I have fixed the problem. It' my mistake. I set grid height : '100%'. That's why giving error.

    thank you

Thread Participants: 1