重新配置ExtJs4中的网格列 - SelModel消失? [英] Reconfiguring grid columns in ExtJs4 - SelModel disappears?

查看:290
本文介绍了重新配置ExtJs4中的网格列 - SelModel消失?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在定义一个具有 selModel 的网格。

每次加载商店时,网格列都会使用网格重新配置方法。 >
但是当我这样做时,网格 selModel 消失。

我如何重新配置​​网格列也包含selModel。 >
以下是一些示例代码:

I am defining a grid which has a selModel.
Each time the store loads, the grids columns are dynamically reconfigured using the grids Reconfigure method.
However when I do this the grids selModel disappears.
How can I reconfigure the grids columns to also include the selModel.
Below is some example code:

//The Selection Model for the grid.
var sm = new Ext.selection.CheckboxModel();

//The Grid
var grid = new Ext.grid.Panel({
    store: store,
    selModel: sm,
    columns:[{
            header: 'Loading ...'
        }]
 });

//The store on load event where the columns are reconfigured
store.on('load', function(store){
    var columns = store.data.Data.items;
    grid.reconfigure(store, columns);
}, this);

在ExtJs3中,我可以将selModel指定为列本身,但ExtJs4不是这样。那么如何确保selModel即使在重新配置网格列之后总是可见?

In ExtJs3 I could specify the selModel as a column itself but this is not the case in ExtJs4. So how can I ensure the selModel is always visible even after reconfiguring the grids columns?

推荐答案

这是一个在Extjs中报告的错误版本[4.0.2]。现在,它已经在Extjs版本[4.0.7]中解决。

It's a bug which is reported in Extjs version [4.0.2]. Now, it has resolved in Extjs version [4.0.7].

这篇关于重新配置ExtJs4中的网格列 - SelModel消失?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆