Hi I am using devexpress and I set the mask type to numeric and the edit mask to “p”.
The problem is I want to limit the masked textbox to 100 percent maximum and not to accept
negative.
Best Regards,
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You should not be trying to set the minimum/maximum values with an EditMask. The ‘p’ EditMask is correctly limiting entry to valid percentage strings, but
123 %or-17.5 %are valid percentages.Instead you should either limit the values that are accepted by implementing an
EditValueChangingevent (you can setCancelif you want to reject a user’s input). Also, many of the DevExpress editors have MaxValue and MinValue properties, such as SpinEdit.Edit to include sample code