如何添加复选框列到Extjs网格 [英] how to add checkbox column to Extjs Grid
本文介绍了如何添加复选框列到Extjs网格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有EXTjs网格。我想知道如何添加复选框到Extjs网格列...
i have EXTjs grid. i want to know how to add the checkbox to the Extjs grid column...
pls帮助...
在我的datatable中,我将获得列状态的值。它可以是真/假。因此基于它应该显示复选框列被选中/未选中。
in my datatable i ll get the value for the column 'Status'. it may br either true/false. so based on that it should show the checkbox column checked / unchecked.
urgent ....
urgent....
推荐答案
查看示例这里。它使用一个名为CheckBoxColumn的插件(您将必须查看源代码并找到该JS文件。
Have a look at the sample here. It uses a Plugin called CheckBoxColumn (you will have to View Source and find the JS file.
插件文件中的一些用法...
Some example usage from the Plugin's file...
var checkColumn = new Ext.grid.CheckColumn({
header: 'Indoor?',
dataIndex: 'indoor',
id: 'check',
width: 55
});
// add the column to the column model
var cm = new Ext.grid.ColumnModel([{
header: 'Foo',
...
},
checkColumn
]);
// create the grid
var grid = new Ext.grid.EditorGridPanel({
...
cm: cm,
plugins: [checkColumn], // include plugin
...
});
这篇关于如何添加复选框列到Extjs网格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文