Ticket T553586
Visible to All Users

Save without mask

created 8 years ago

Hi,

Is posible save in DB only the value, without "-" in textbox with this mask, \d\d\d\d-\d\d\d\d-\d\d-\d\d\d\d\d\d\d\d\d\d

thanks

Answers approved by DevExpress Support

created 8 years ago

Hello Alfredo,

Thank you for reaching out to us. To achieve the desired behavior, set the MaskProperties.SaveLiteral property to false. Once you test it, let me know if it helps.

    Comments (2)

      Hi,

      Is necessary to change in code?? Because in desing mode is dissenabled.
      Atach one image.

      DevExpress Support Team 8 years ago

        Hello Alfredo,

        Please accept my apologies for not being clear enough. As sated in our documentation, the SaveLiteral property is in effect for the MaskType.Regular and MaskType.Simple mask types. So, I suggest you change MaskType to MaskType.Regular or use the following Simple mask:

        C#
        textEditWithSimpleMask.Properties.Mask.EditMask = "0000-0000-00-0000000000"; textEditWithSimpleMask.Properties.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.Simple; textEditWithSimpleMask.Properties.Mask.SaveLiteral = false; textEditWithSimpleMask.Properties.Mask.UseMaskAsDisplayFormat = true;

        Let me know if you have additional questions.

        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.