Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
215
Data error: Value does not match the required pattern.
posted

I used to have a column in my grid set as a textbox with a regexPattern. I have since changed it to a valuelist with a style of dropdownlist.

Now no matter what value is selected off of the list I get a grid_error event with the following data:

e.ErrorText: "Unable to update the data value: Value does not match the required pattern."

e.ErrorType: Data

e.DataErrorInfo.Cell.Column.Format: ""

e.DataErrorInfo.Cell.Column.MaskInput: ""

e.DataErrorInfo.Cell.Column.RegexPattern: ""

e.DataErrorInfo.InvalidValue": "03"

e.DataErrorInfo.Eception: null

e.DataErrorInfo.Cell.SelText: 'e.DataErrorInfo.Cell.SelText' threw an exception of type 'System.NotSupportedException'

e.DataErrorInfo.Cell.Text" "03"

e.DataErrorInfo.Cell.Value: " "

The Text "03" is the value selected from the valuelist and there is no regex pattern set for the column anymore.

How can I be getting a required pattern error?

This is the only column in a grid with ten other dropdownlists that is giving this error.

Any possible ideas would be appreciated.

Parents
No Data
Reply
  • 469350
    Verified Answer
    Offline posted

    How did you clear the pattern? Did you set it to an empty string? Did you Reset it in the property grid? Did you use the ResetRegexPattern method?

    This clearly must have something to do with the RegexPattern. Perhaps an empty string, like you show here, is a valid pattern. Try setting it to null instead of an empty string or use the ResetRegexPattern to clear it.

Children