PDA

View Full Version : Editable Column--new value disappears and shows default val after hitting enter



JohnJones357
11 Jun 2014, 1:26 PM
I have a column editor whos value is defaulted to the value from another column. Once you edit the default value and click enter, it shows the dirty red flag on the cell but also the default value, instead of the new edited value. To see edited value user would have to dbl click that cell again--re-enabling editor.

Its that how it is? Or is it because I ve set a default value on that column?

to set default val on editable column, ColumnC, I added a renderer:

colCRenderer: function(val, meta, rec){
return rec.get("ColumnA");
}

thanks

Scott Mildenberger
12 Jun 2014, 11:18 AM
The renderer doesn't set a default value but defines what is displayed. You could condition what you display based on the field value being blank. Something like:


colCRenderer: function(val, meta, rec){
if (val == '') {
return rec.get("ColumnA");
}
else {
return val;
}
}