How to expand row in a grid using rowexpander plugin Extjs 4.1.1

最后都变了- 提交于 2019-12-13 00:35:06

问题


How to expand row in a grid using rowexpander plugin? I am using the following code in my controller

'editbasicinfotitlegrid gridview' : {
            afterrender:this.expandAll
 }

expandAll: function(){

    var titlesGrid = Ext.getCmp('editBasicInfoTitleGrid');     
    var expander = titlesGrid.getPlugin('myRowExpander');
    console.log(titlesGrid.plugins[0]);
    expander.toggleRow(0);

}

But this code gives me the following error

Uncaught TypeError: Cannot call method 'down' of null 

回答1:


So I have found its solution.The toggleRow() function of RowExpander works only on viewready Event of grid.So calling this function on viewready instead of afterrender worked for me.



来源:https://stackoverflow.com/questions/12340421/how-to-expand-row-in-a-grid-using-rowexpander-plugin-extjs-4-1-1

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!