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?
Hello Michael,
The reason that you cannot update the editor value when the column setting is readOnly: true is that the igGridUpdating doesn't create an editor for this column.
If you want the editor to be created then use the readOnly setting of the editor itself.
Here is an example code:
readOnly: true,
validatorOptions: getValidationOptions
Hope this helps,Martin PavlovInfragistics, Inc.
Thanks for the simple answer. I overlooked that. I guess I assumed the editor inherited some properties from the column.
Thanks again.