Javascript ExtJS包含Ex.ux.ComboColumn
我被卡住了 我想包括,但我不知道如何做到这一点(以前从未使用过javascript和ExtJs(使用ExtJS3)) 我已经下载了javascript文件,并将其放在与我的网页相同的文件夹中 我用ExtJs构建的Web端如下所示:Javascript ExtJS包含Ex.ux.ComboColumn,javascript,extjs3,Javascript,Extjs3,我被卡住了 我想包括,但我不知道如何做到这一点(以前从未使用过javascript和ExtJs(使用ExtJS3)) 我已经下载了javascript文件,并将其放在与我的网页相同的文件夹中 我用ExtJs构建的Web端如下所示: Ext.onReady(function() { var myRefStore = new Ext.data.JsonStore({ url: 'dispatchAjaxRequest', baseParams: {
Ext.onReady(function() {
var myRefStore = new Ext.data.JsonStore({
url: 'dispatchAjaxRequest',
baseParams: {
eventPath: 'frontend.CustomFunctions',
eventMethod: 'getData',
jsonInput: Ext.encode({
tableName: 'CCMS_REF',
start: 0,
limit: rowLimit
})
},
root: 'store',
id: 'gridStore',
fields: ['id', 'external_user', 'external_company', 'external_product', 'system_id', 'context_name', 'system_id'],
autoLoad: true
});
var userCombo = new Ext.ComboBox({
id: 'myCombo',
triggerAction: 'all',
store: myRefStore,
selectOnFocus: true,
typeAhead: true,
editable: false,
forceSelection: true,
mode: 'remote',
displayField: 'context_name',
valueField: 'id',
hideMode: 'offsets',
lazyInit: false,
hiddenName: 'mycontext',
name: 'mycontextname'
})
var editGrid = new Ext.grid.EditorGridPanel({
id: 'editTable',
title: 'Edit table BIC_CUST_CCMS_OBJECTS',
header: true,
renderTo: 'contentDivCcms',
clicksToEdit: 1,
//height:350,
autoHeight: true,
//style: 'margin-bottom: 50px',
colModel: new Ext.grid.ColumnModel({
defaults: {
width: 120,
sortable: false,
hideable: false,
menuDisabled: true
},
viewConfig: {
forceFit: true
},
columns: [{
hidden: true,
header: 'id',
dataIndex: 'id',
editable: false
}, {
header: 'sap_ref',
dataIndex: 'sap_ref',
width: 50,
xtype: 'combocolumn', // Use the custom column or use the column's render manually
editor: userCombo, // The custom column needs a ComboBox editor to be able to render the displayValue, without it just renders value
gridId: editTable
},
}),
store: myStore,
sm: new Ext.grid.RowSelectionModel({
singleSelect: false
}),
});
});
});
但我只得到以下错误:
TypeError:Ext.ComboBox不是构造函数
如何包含Ext.uxComboColumn.js
问候
LStrike使用
Ext.form.field.ComboBox
或Ext.form.ComboBox
而不仅仅是Ext.ComboBox
var userCombo = new Ext.form.field.ComboBox({
id: 'myCombo',
triggerAction: 'all',
store: myRefStore,
selectOnFocus: true,
typeAhead: true,
editable: false,
forceSelection: true,
mode: 'remote',
displayField: 'context_name',
valueField: 'id',
hideMode: 'offsets',
lazyInit: false,
hiddenName: 'mycontext',
name: 'mycontextname'
});