Hi, I am generating a grid dynamically in ASP.NET that uses WebNumericEdit if the datatype is Int. The SpinButtons are enabled by default and are not getting disabled even if I set the following:
WebNumericEdit wne = new WebNumericEdit();
wne.SpinButtons.Delta = 0;
wne.SpinButtons.SpinOnArrowKeys =false;
I do not want the value to be modified when the user presses up or down arrows. How do I make sure these properties persist?
Thanks!
Hello Deepika,
Thank you for posting in our community.
It's been a while since your last query, but if you still need assistance regarding this matter I'm glad to help you.
Based on the provided code snippet, please note that the control class name that you've specified is incorrect. The correct one is "WebNumericEditor". Also the correct reference to the WebNumericEditor spin buttons is through its Buttons property, from where you may access container of properties related to the spin buttons. Please refer to the following documentation that exposes WebNumericEditor class members for your reference: http://help.infragistics.com/Doc/ASPNET/Current/CLR4.0/?page=Infragistics4.Web.v13.2~Infragistics.Web.UI.EditorControls.WebNumericEditor_members.html
In the current scenario if you want to disable spin buttons, then you may use something like this:
var wne = NumericEditorProvider1.GetEditor() as WebNumericEditor; wne.Buttons.SpinOnArrowKeys = false; wne.SpinDelta = 0;
var wne = NumericEditorProvider1.GetEditor() as WebNumericEditor;
wne.Buttons.SpinOnArrowKeys = false;
wne.SpinDelta = 0;
Please let me know if you have any further questions.
Sincerely,
Tsanna