Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1015
Modify value of Read Only Editor in Grid?
posted

Can someone please verify this as well?

I have a few columns in my grid that I need to update via code when another column is updated.  I can't let the user update this field because it is calculated.

I can't seem to update the value via code when I set the column to readOnly: true.

I had to leave it as readOnly: false and capture the keydown event to see if it was tab, or shift otherwise cancel the keystroke.

 

{

columnKey: "EstExtPrice",

required: true,

readOnly: false,

editorType: 'numeric',

defaultValue: 0,

editorOptions: {

maxDecimals: 2,

nullValue: 0,

maxValue: 99999999.99,

validatorOptions: getValidationOptions,

keydown: function (evt, ui) {

var key = ui.key;

if (key == 9 || key == 16) {

return true;

}

else {

return false;

}

}

}

}

 

 

I can update the values of the Numeric editors via code if set to readOnly and if they are on a form outside of the grid.

 

Is this expected behavior?