3
如何自定義Extjs中的errorSummary? errorSummary的默認標題是「錯誤」(附帶截圖供參考),有什麼方法可以將其更改爲其他內容?如何將錯誤摘要的默認標題從「錯誤」更改爲EXTJ中的其他內容
Ext.create('Ext.data.Store',{
storeId:'simpsonsStore',
fields:['name', 'email', 'phone'],
data: [
{"name":"Lisa", "email":"[email protected]", "phone":"555-111-1224"},
{"name":"Bart", "email":"[email protected]", "phone":"555--222-1234"},
{"name":"Homer", "email":"[email protected]", "phone":"555-222-1244"},
{"name":"Marge", "email":"[email protected]", "phone":"555-222-1254"}
]
});
Ext.create('Ext.grid.Panel', {
title: 'Simpsons',
store: Ext.data.StoreManager.lookup('simpsonsStore'),
columns: [
{header: 'Name', dataIndex: 'name', editor: 'textfield'},
{header: 'Email', dataIndex: 'email', flex:1,
editor: {
xtype: 'textfield',
allowBlank: false
}
},
{header: 'Phone', dataIndex: 'phone'}
],
selType: 'rowmodel',
plugins: [
Ext.create('Ext.grid.plugin.RowEditing', {
clicksToEdit: 1,
errorSummary:true,
})
],
height: 200,
width: 400,
renderTo: Ext.getBody()
});
感謝@MrBruno :),它的工作 –
@JojoRaghav如果它的工作,請標記爲正確答案 –