일부 열이있는 SmartClient ListGrid가 있습니다. ListGrid에는 편집 모드 (입력하려면 더블 클릭) 및 부울 필드가있는 일부 텍스트 필드가 있습니다.SmartClient ListGrid boolen 필드, editMode 없음 (더블 클릭)
내가해야 할 일은 부울 필드에 대해 editMode를 사용하지 않도록 설정하고 (두 번 클릭을 사용하지 않도록 설정) 일반적인 '원 클릭'을 사용하여 부울 값을 변경하는 것입니다.
다른 열은 두 번 클릭하면 작동합니다.
아이디어가 있으십니까?
내 코드 :
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);
}
}