【发布时间】:2016-09-29 07:07:39
【问题描述】:
我有一些列的 smartclient ListGrid。 ListGrid 有一些带有编辑模式的文本字段(双击进入)和布尔字段。
我需要做的就是禁用布尔字段的编辑模式(禁用双击)并仍然启用正常的“一键式”来更改布尔值。
双击应该适用于其他列。
有什么想法吗?
我的代码:
isc.ListGrid.create({
ID: "ColumnsList",
saveLocally: true,
filterLocalData: true,
alternateRecordStyles: true,
canReorderRecords: true,
selectionAppearance: 'rowStyle',
autoFetchData: false,
showRollOver: true,
canRemoveRecords: true,
deferRemoval: false,
initWidget: function () {
this.Super('initWidget', arguments);
var me = this;
var fields = [
{name: 'id', primaryKey: true, required: true, showIf: 'false', canEdit: false, canHide: false},
{
name: 'name',
validOperators: [],
canEdit: true,
canHover: false,
canSort: false,
title: 'DB Column Name'
},
{
name: 'primaryKey',
validOperators: [],
width: '12%',
canEdit: true,
canHover: true,
canSort: false,
//canToggle: true,
title: 'Primary Key',
type: 'boolean',
changed: function (form, item, value) {
// my logic to allow only one value per column is selected
}
}
];
me.setFields(fields);
}
}
【问题讨论】:
标签: smartclient