我正在尝试在 extjs 的 RowEditor 网格中检索“复选框组”的选中值。到目前为止,我所做的是我在我的 RowEditor 列之一中创建了一个复选框组,如下所示
columns: [
{
id: 'weekdays',
header: 'Week Days',
dataIndex: 'weekDays',
width: 150,
sortable: true,
editor: {
xtype: 'checkboxgroup',
allowBlank: true,
frame : true,
vertical : true,
columns: 2,
items: [
{boxLabel: 'Sunday', name: 'S', checked: true},
{boxLabel: 'Monday', name: 'M', checked: true},
{boxLabel: 'Tuesday', name: 'T', checked: true},
{boxLabel: 'Wednesday', name: 'W', checked: true},
{boxLabel: 'Thursday', name: 'T', checked: true},
{boxLabel: 'Friday', name: 'F', checked: true},
{boxLabel: 'Saturday', name: 'S', checked: true}
]
}
},{ ...........// rest other columns
我尝试使用 getValue() 方法检索值,但没有成功。我试过了
var schdeditor = new Ext.ux.grid.RowEditor({
saveText: 'Update',
listeners: {
afteredit: function(object, changes, r, rowIndex) {
// Do custom things
var cm = object.grid.colModel,
fields = object.items.items;
var weeks = fields[0].getValue();
当我运行它时,我的浏览器只是挂起,一段时间后我收到“堆栈溢出错误”