I have a WebDataGrid with a NumericEditorProvider with a MinValue=0 and a MaxValue=80. If I enter a value of 100, the control automatically changes the value to 80 without notifying the user. How can I get the control to provide some feedback that a range fiolation has been reached? Do I have to use a range validator or does the provider have this sort of functionality?
-Mark
Ok, I've partially answered my own question. I was able to implement a range validator, but now the user can leave the cell blank which is a violation of a required field validataion. Can a column have two forms of validation?
Hello Mark,
Thank you for posting in our forum.
The NumericEditorProvider has a client side event InvalidValueEntered . In its eventArgs you can determine what is the cause of the invalid input with the following functions:
isLimit()- returns true if the value is outside the limits
isNull()- returns true if no value is entered.
Depending on what these functions return you can show a different message to the user. You can also manipulate the value in the current cell with the set_value, set_text methods if you wish.
Let me know if this possible solution is applicable in your scenario. Don’t hesitate to contact me if you have any further questions or concerns.
Best Regards,
Maya Kirova
Developer Support Engineer
Infragistics, Inc.
http://es.infragistics.com/support
I actually went with a different approach. I used a custom validator with the ValidateEmptyText to true and was able to accomplish the level of vaidation I was looking for.
Thank you for your assistance.