Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7064325
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T04:49:14+00:00 2026-05-28T04:49:14+00:00

Hi I am using devexpress and I set the mask type to numeric and

  • 0

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,

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T04:49:15+00:00Added an answer on May 28, 2026 at 4:49 am

    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 EditValueChanging event (you can set Cancel if 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

        void spinEdit1_EditValueChanging(object sender, DevExpress.XtraEditors.Controls.ChangingEventArgs e)
        {
            Decimal newValue;
            if (Decimal.TryParse(e.NewValue.ToString(), out newValue))
            {
                if (newValue < 0 || newValue > 100)
                    e.Cancel = true;
            }
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using DevExpress XtraGrid in c#.NET application. I want to disable or set
I'm using DevExpress LookUpEdit control in my application. I want to set the datasource
i am using devexpress grid with edit functioality to update the records in the
Hi Im using devexpress . I want to know how to get the value
I try using Devexpress Layout-Control (For costume usage). So I want add all item's
I'm using DevExpress's GridLookUpEdit control in a grid and I want the contents of
I'm using DevExpree XtraTreeList Control, I want to randomly Set one of the first
I am using DevExpress Components controls.I want to create controls from string Value like
Iam using Devexpress aspxgridview control in asp.net. I want to reload the page on
I am using devexpress 9.1. I have devexpress gridview binded to datasource. have set

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.