Bug Report T828978
Visible to All Users

Validation - Non-string values are incorrectly interpreted as invalid using mask validation rules while updating row values

created 5 years ago (modified 5 years ago)

Attached is a sample project that can be used to reproduce the issue.
To reproduce the issue, do the following:
1. Start editing any GridView row.
2. Click the Update button

As a temporary workaround, it is possible to clear the EditorPropertiesErrors collection for a corresponding column in the RowValidating event handler:

C#
protected void ASPxGridView1_RowValidating(object sender, DevExpress.Web.Data.ASPxDataValidationEventArgs e) { ASPxGridView gridView = sender as ASPxGridView; e.EditorPropertiesErrors.Remove(gridView.Columns["OrderTime"]); }

Answers approved by DevExpress Support

created 5 years ago

We have fixed the issue described in this ticket and will include the fix in our next maintenance update. To apply this solution before the official update, request a hotfix by clicking the corresponding link for product versions you require.

Note: Hotfixes may be unavailable for beta versions and updates that are about to be released.

    Comments (2)

      This problem is still happening on our phone number fields, see below for column definition.

      HTML
      <dx:GridViewDataTextColumn FieldName="PhoneCellNumeric" Caption="Mobile" Width="110px"> <PropertiesTextEdit Width="110px" DisplayFormatString="{0:(###) ###-####}"> <MaskSettings Mask="(000) 000-0000" IncludeLiterals="None" /> <ClientSideEvents Validation="dxPhoneValidation" /> </PropertiesTextEdit> <CellStyle HorizontalAlign="Left" /> <EditFormSettings VisibleIndex="7" ColumnSpan="2" /> </dx:GridViewDataTextColumn>
      DevExpress Support Team 5 years ago

        Hello,
        To better process your recent request, I've created a separate ticket on your behalf:
        T836105: GridView - Numeric values are treated as invalid while updating row values using mask validation
        It has been placed in our processing queue and will be answered shortly.

        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.