Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change default title of errorSummary from "Errors" to something else in EXTJs

Tags:

extjs

How to customize errorSummary in Extjs? The default title for errorSummary is "Errors"(screenshot attached for reference), is there any way to change it to something else?

Image

 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()
});
like image 686
Jojo Raghav Avatar asked Dec 20 '25 22:12

Jojo Raghav


2 Answers

plugins: [
    Ext.create('Ext.grid.plugin.RowEditing', {
        clicksToEdit: 1,
        errorsText:'test',
        errorSummary:true
    })
],
like image 142
Mr.Bruno Avatar answered Dec 23 '25 15:12

Mr.Bruno


If you want to change it globally,We can override the editing plugin by using below code.

     Ext.define('OverridedRowEditing',{
       override: 'Ext.grid.plugin.RowEditing',
       config: {
           errorsText: 'Test'
       }
    });
like image 35
Surya Prakash Tumma Avatar answered Dec 23 '25 15:12

Surya Prakash Tumma



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!