Current filter:
                                You should refresh the page.
                                  • I need to disable value change of numeric cell in cases:
                                    Press up arrow (increment value)

                                    Press down arrow (decrement value)

                                    Mouse wheel (increment/decrement depending on direction)

                                    For case “1” and “2” I find a workaround described in ticket T275412, but maybe there is a more supported way?
                                    For case “3” I need a solution. Thank you in advance.
                                     

                                1 Solution

                                Creation Date Importance Sort by

                                Hi,

                                Thanks for the detailed description. You can try one of the following solutions:

                                1. You can set the step option to 0 to disable increment and decrement actions on keyboard arrows and mouse wheel.
                                [JavaScript]
                                { dataField: "Number", width: 100, editorOptions: { step: 0 } },
                                2. You can change the dxNumberBox editor to dxTextBox using the onEditorPreparing handler.
                                [JavaScript]
                                onEditorPreparing: function (e) { if (e.dataField == "FieldHere" && e.parentType == "dataRow") { e.editorName = "dxTextBox"; e.editorOptions.someSetting = "...." .... } },

                                You can define a numeric mask to allow numbers only.

                                Try these ideas and let us know your results.

                                • Kapnin AV 10.31.2016

                                  Thank you, we used the first solution. But if the cell value is empty by increment and decrement actions on keyboard arrows and mouse wheel the value initializes to 0. There is a solution to this problem? 

                                • Marion (DevExpress Support) 10.31.2016

                                  This issue is not entirely clear. Would you please clarify it in greater detail? Do you want to show an empty text inside an editor?

                                • Kapnin AV 10.31.2016

                                  If cell has 'empty' value then after scroll/press arrow its value changes to '0'.
                                  I need to disable this behavior too. Is it available for solution #1 (please see the updated example)?
                                   

                                • Alessandro (DevExpress Support) 10.31.2016

                                  Hi,

                                  You can handle the onKeyDown event and call the jQueryEvent.stopPropagation method when the up or down arrow is clicked to avoid this behavior.

                                  [JavaScript]
                                  editorOptions: { step: 0, onKeyDown: function (info) { if (e.jQueryEvent.keyCode === 38 /* down arrow */ || e.jQueryEvent.keyCode === 40 /* up arrow */) info.jQueryEvent.stopPropagation(); } }

                                  As for the mouse wheel, there is no easy option, I am afraid. Please review the T297858: dxDataGrid - Disable the mouse wheel event in the dxNumberBox when the datagrid is in edit mode ticket where we answered a similar question.