PDA

View Full Version : RowEditing force value



georgi1980
27 Apr 2013, 4:42 AM
Hello,
I need to force value of a editable column by the value of another column. I try following:


beforeedit: function(editor, e, eOpts) {
if (e.record.get('product_type') == 3){
rowEditing.editor.form.findField('actionart').enable();
}else{
lsfProductNewGridRowEditing.editor.form.findField('actionart').setValue('');
e.record.data.actionart= '';
lsfProductNewGridRowEditing.editor.form.findField('actionart').disable();
}
}

The disabling of the field works, but setting it's value to an empty string not. I try the same code also on 'edit' event, it is also not working :(. Thank you for your help!
Regards,
G.Georgiev

georgi1980
29 Apr 2013, 12:52 AM
Hello,
I've just find out, that my code does update the record, but the grid is still showing the old value. Any idea jow can I update the gridcell?
Regards

georgi1980
29 Apr 2013, 1:28 AM
Sorry for spanning. e.record.commit() was enough to update the record and the gridcolumn