PDA

View Full Version : Buttons update cancel rowediting



Fanny144
4 May 2011, 6:14 AM
Is it possible change the name of the rowediting's buttons (update and cancel) like in other versions of EXT JS??

atian25
4 May 2011, 10:54 PM
u can override 'Ext.grid.RowEditor' s saveBtnText/cancelBtnText in locale file

ZaDarkSide
24 May 2011, 6:08 AM
Add this code and change the strings:



if (Ext.grid.RowEditor) {
Ext.apply(Ext.grid.RowEditor.prototype, {
saveBtnText: 'Update',
cancelBtnText: 'Cancel',
errorsText: 'Errors',
dirtyText: 'You need to commit or cancel your changes'
});
}

Farish
8 Jul 2011, 1:19 AM
I am creating a row editing plugin as follows:


var rowEditing = Ext.create('Ext.grid.plugin.RowEditing', {
id:'rowEditing',
clicksToEdit: 2
});but inserting

saveBtnText: 'Add',to above doesn't help... How can I change it in the above code? I dont want to change the button text for everything. For Add event, I want the button to have "Add" and for Update, I want it to read "Update".

For this, I can create two row editors and use them for Add and Update separately. but only if it works...

Regards,
Farish