The WebPercentEditor allows the value to go above the MaxValue when using the up arrow key. The old WebPercentEdit control did not allow this. For example, the HTML code below will only allow a max of 99.999 to be typed in by the user but they can use the arrow key to increase the value. Is there a way around this?
<ig:WebPercentEditor ID="wpeRate" runat="server"
Width="50px"
SkinID="Decimal3"
MaxValue="99.999"
MinValue="0"
MaxLength="6"
Nullable="True"
MinDecimalPlaces="3"
Style="z-index: 110; left: 12px; position: absolute; top: 0px">
</ig:WebPercentEditor>
Hello Autumn,
By design we do not have such property, although this could be implemented as a new product idea. I would recommend you to log it at http://ideas.infragistics.com, the Product Ideas site allows you to suggest new product features, new functionalities in existing products and controls, and even request new controls and products altogether. Members of the Infragistics Community then vote for the features and suggestions they want to see added to the products, resulting in the most popular features bubbling up to the top. When planning new releases, our Product Management team will look at the most popular features and use your feedback to prioritize upcoming work.
Looking forward to hearing from you.
Thanks but we already have a JavaScript function that does this. It would need to be updated to divide by 100 if we set our PercentageEdiiors to 0.999999 (to prevent the arrow key from going above the max) instead of 99.9999. I was hoping that there was a property on the control that could stop this behavior.
About your last question, this behavior is by design, although if you want you can implement custom solution which will help you to restrict the user for typing value greater than the maxValue. I have created a sample for you in order to show you this approach, could you please take a look and let me know if this suggestion suits your needs.
I hope you will like it, if not we could figure something else.
Code snippet:
The problem was introduced because of the JavaScript function we wrote to prevent the user from being able to type in a number larger than the MaxValue and when they tab out of the control, the number changes to the MaxValue. Is there a way to stop this from happening?
If you have any concerns or further questions, please let me know.
Regards,
Tsanna