Hi Martin,
Greetings
from Syncfusion support.
We understand
that you would like to prevent changes to the numeric value on the keyboard up
and down actions. This can be achieved by using the keyDownHandler within the
edit parameters. Here’s a sample code snippet to illustrate this approach:
|
{
field: 'duration',
headerText: 'Duration',
textAlign: 'Right',
width: 140,
editType: 'numericedit',
validationRules: { number: true, min: 0 },
edit: {
params: {
format: 'n',
showSpinButton: false,
keyDownHandler: function (e) {
switch (e.keyCode) {
case 38:
e.preventDefault();
break;
case 40:
e.preventDefault();
}
},
},
},
},
|
Sample: https://stackblitz.com/edit/nuasbp?file=index.ts
If you need
further assistance, please feel free to reach out.
Regards,
Shek