extjs网格内部单列内部不同的控件显示。 网格渲染这个时间控制渲染而不是单元格编辑这次控制显示这个我不需要。
我的要求是此次显示控件的网格数据加载。
例如
xtype: 'grid',
margin: '0 0 8 0',
itemId: 'navigationgrid',
plugins: {
ptype: 'cellediting',
clicksToEdit: 1,
listeners: {
beforeedit: function (editor, context, eOpts) {
if (context.colIdx == 1 && context.record.get('functionality') == "DocumentReviewAudit_edit") {
return false;
} else {
return false
}
}
}
},
flex: 1,
store: {
fields: ['allowed', 'functionality', 'dis_functionality'],
data: [
{ allowed: me.isCreateUser, functionality: 'Case Folders', dis_functionality: LAN.userFunctionality.caseFolderNavigationFunctionality },
{ allowed: me.isCreateUser, functionality: 'User Folders', dis_functionality: LAN.userFunctionality.workFolderNavigationFunctionality },
{ allowed: me.isCreateUser, functionality: 'Review Folders', dis_functionality: LAN.userFunctionality.userFolderNavigationFunctionality },
{ allowed: me.isCreateUser, functionality: 'Production Folders', dis_functionality: LAN.userFunctionality.productionFunctionality },
{ allowed: me.isCreateUser, functionality: 'Case Clusters', dis_functionality: LAN.userFunctionality.caseLevelClusterFunctionality },
{ allowed: me.isCreateUser, functionality: 'Key Phrases & Doc Summary', dis_functionality: LAN.userFunctionality.keyPhreasesAndDocSummary },
{ allowed: me.isCreateUser, functionality: 'Document Review Audit', dis_functionality: LAN.userFunctionality.documentReviewAudit },
{ allowed: me.isCreateUser, functionality: 'DocumentReviewAudit_edit', dis_functionality: ''},
{ allowed: me.isCreateUser, functionality: 'Duplicate Document Info', dis_functionality: LAN.userFunctionality.duplicateDocumentInfo },
{ allowed: me.isCreateUser, functionality: 'View E-Mail Threads', dis_functionality: LAN.userFunctionality.viewEmailThreads },
{ allowed: me.isCreateUser, functionality: 'Work Product', dis_functionality: LAN.userFunctionality.workProductFunctionality }
]
},
columns: [
{
xtype: 'CheckboxHeaderColumn',
dataIndex: 'allowed',
hideable: false,
sortable: false,
width: 25,
disabled: me.isReadOnly,
listeners: {
checkchange: function (column, rowIndex, checked, eOpts) {
var navigationgrid = me.down('#navigationgrid'),
record = navigationgrid.getStore().getAt(rowIndex);
if (record) {
record.set('allowed', checked);
record.commit();
navigationgrid.getStore().sync();
}
},
headerclick: Ext.bind(me.headerClick, this, me, true)
}
},
{
text: LAN.users.viewOptions,
dataIndex: 'dis_functionality',
flex: 3,
hideable: false,
sortable: false,
editor: 'textfield'
},
{
text: LAN.users.viewOptions,
dataIndex: 'functionality',
flex: 3,
//hideable: false,
hidden: true,
sortable: false
}
],
listeners: {
// cellclick: function (ctrl, gridCell, index, record, tr, rowIndex, e) {
// me.cellClick(ctrl, gridCell, index, record, tr, rowIndex, e);
// }
select: function () {
me.down('#navigationgrid').getSelectionModel().deselectAll();
},
}