Ticket T487697
Visible to All Users

TextBoxFor - How to set currency and min/max values

created 8 years ago

Since I can't get CardView to start up in NEW mode.  I'll use a normal view to CREATE the object.

How do I set the currency to have a MAXIMUM and MINIMUM value ??? below

@Html.DevExpress().TextBoxFor(m => m.Amount, settings =>
{
    settings.Properties.DisplayFormatString = "C";
  ???      settings.Properties.MinValue = 0;
  ???   settings.Properties.MaxValue = ViewBag.MaximumAmount;
}).GetHtml()

Answers approved by DevExpress Support

created 8 years ago (modified 8 years ago)

Hello,

I suggest you use SpinEdit in this scenario. In your case, set its DisplayFormatString property to "C" to apply the currency format and set the MinValue and MaxValue properties to specify the minimum and maximum values. See the Spin Edit demo where this control is demonstrated.
Let us know if this approach helps.

    Comments (1)

      Thank you.  Perfect.

      Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

      Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.