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,
I'm afraid I can't understand what you're trying to achieve. If you set MaxValue to 0.99999, then the maximum value that will be displayed in the editor (no matter if you type it in or use the up arrow key) converted in percent will be 99.999%. What concerns you about that? If you type in a value greater than this, then the editor will display the MaxValue. If you think that the issue is different, then please capture a small video that demonstrates it so I can figure it out. Looking forward to your response.
Regards,
Tsanna
That is not how this control works. If I code the following the user can only enter 0.9999 (this is what displays) and they can use the up arrow key to go to 99.9990.
We need the user to only be able to enter a max of 99.9999 regardless if they type it in or use the arrow key.
<ig:WebPercentEditor ID="wpeMargin" runat="server"
MaxValue="0.99999"
MinValue="-0.99999"
Style="z-index: 110; left: 165px; position: absolute; top: 25px"
Width="62px" ></ig:WebPercentEditor>
The MaxValue should be: MaxValue="0.99999". Then when you enter a number greater than this, the editor will automatically convert it into percent and will display the max value, which will be: 99.999. If you have further questions, please let me know.
So how do we code it to only allow 99.9999 to be entered by the user whether they are typing it in manually or using the arrow key?
After further testing, our developers informed me that this is not a bug and it's the correct behavior of the WebPercentEditor because of the percentage conversions and calculations that it perform. When you set Max value to 99.999, this means 9999% because the editor converts the number in percent multiplying it to 100. If you have any questions, please let me know.