View Full Version : HowTo:remove the red mark in the EditorGrid field on edit?
Srinivas B
14 Jul 2007, 8:10 AM
Hi All,
While edit happening in the Ext.grid.EditorGrid's cell .. one red mark is appearing at top left corner of the cell.I dont want to show the red mark on Edit.. How can i achieve this.
i am placing the screen shot of the same...
Please any ideas ..
Thanks in advance...
Srinivas
jay@moduscreate.com
14 Jul 2007, 10:01 AM
Try looking @ the grid css. It's in there somewhere. you can inspect with firebug to get your answer.
VinylFox
14 Jul 2007, 1:32 PM
This seems like an easy way.
grid.on('afteredit', afterEdit, this );
function afterEdit(val) {
val.record.commit();
};
jay@moduscreate.com
14 Jul 2007, 2:04 PM
^^ Does that execute an XHR to send/commit data to the server?
VinylFox
15 Jul 2007, 6:49 AM
nope, just changes the cell style back to the one without the little red corner and updates the data store with the new value.
Srinivas B
16 Jul 2007, 3:41 AM
Thanks VinylFox .. It works perfectly fine.
Thanks once again,
Srinvias.
jack.slocum
16 Jul 2007, 4:48 AM
This CSS will do it:
.x-grid-dirty-cell {
background-image:none;
}
Srinivas B
16 Jul 2007, 9:09 PM
Thanks Jack,
This solution looks more light weight than making the javascript call and it also working perfectly fine.
Thanks once again,
srinivas
zoola
17 Mar 2008, 3:33 PM
This CSS will do it:
.x-grid-dirty-cell {
background-image:none;
}
but what if i want to remove the red triangle only from some records (and not all)?
mystix
19 Mar 2008, 11:03 PM
but what if i want to remove the red triangle only from some records (and not all)?
hook into the grid's validateedit event and cancel it if the edit occurred on a targeted row, then set the field's new value in the Record directly
grid.on('validateedit', function(e) {
var myTargetRow = 6;
if (e.row == myTargetRow) {
e.cancel = true;
e.record.data[e.field] = e.value;
}
})
sergiu079
12 Jun 2009, 12:10 AM
I want to remove the red corners after I receive the answer from the server that all data is successfully saved. Any suggestions are welcomed.
Thanks
UPDATE : I found it
store.commitChanges();
mystix
12 Jun 2009, 12:37 AM
I want to remove the red corners after I receive the answer from the server that all data is successfully saved. Any suggestions are welcomed.
Thanks
after receiving an answer from your server,
myStoreReference.commitChanges();
Powered by vBulletin® Version 4.1.5 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.