Current filter:
                                You should refresh the page.

                                1 Solution

                                Creation Date Importance Sort by

                                Hi,

                                If you wish to allow entering only alphanumeric characters and a hyphen, use the RegEx mask. We described what meta-characters we support in the Mask Type: Extended Regular Expressions help article. In particular, there you can see that "[0-9a-fA-F]" can be used to allow entering only letters and digits. The hyphen relates to Any Other Characters. That is why it can be added to your mask as is.
                                Please refer to the Mask Type: Extended Regular Expressions help article and let me know if you need further assistance.

                                Show all comments
                                • Bvsoft 01.11.2019

                                  Hi Svetlana, thank you for you answer

                                  I have tried his mask, it does not work for me, to configure this mask only allows to enter a letter or a number, only one character in the text box.

                                  My buttonEdit should allow the entry similar to this:

                                  A-05
                                  B-90
                                  A1
                                  A2
                                  Among others similar...

                                  What should I modify?

                                  See attached image.
                                  Thank you.

                                • Brendon Muck [DevExpress MVP] 01.11.2019

                                  There's a few different expressions you can try, but for instance:

                                  [C#]
                                  [A-Z]-\d\d|[A-Z]\d

                                  Would allow for the examples you set above.

                                • Bvsoft 01.11.2019

                                  Thanks Brendon,

                                  It works, however it has restrictions, if the user wishes to add more characters it is not possible unless I programmatically assign the mask like this:

                                  [C#]
                                  [A-Z]-\d\d\d\d\d|[A-Z]\d

                                  And sometimes the amount of characters that the user could enter is not clearly determined.
                                  And not necessarily the user must begin to escbirir with a letter, can begin to write with a number.

                                • Brendon Muck [DevExpress MVP] 01.11.2019

                                  You can use the "+" designation to allow for more than one character. Such as \d+ to force 1 or more digits.

                                  You can use the pipe | as an OR condition for the beginning of the string, such as:

                                  [C#]
                                  [A-Z]-\d+|\d-\d+

                                  Without knowing all of the rules and patterns of your requirement, it's impossible for me to suggest something that will satisfy all of your conditions. Regardless, the DevExpress controls adhere to a POSIX-style RegEx syntax, so you would be more successful studying that syntax and perhaps trying one of the many available online RegEx builder/tester websites.

                                • Bvsoft 01.11.2019

                                  Brendon Thanks for your response, with this I will solve it.

                                  Can you give a question to another question I have here? how to update the DataBindings when the data source returned empty and the user changes the value in the control in runtime OnPropertyChanged

                                  Please.

                                • Nadezhda (DevExpress Support) 01.11.2019

                                  We have answered you in that thread. If you have additional questions regarding this topic, feel free re-activate the how to update the DataBindings when the data source returned empty and the user changes the value in the control in runtime OnPropertyChanged ticket.

                                • Bvsoft 01.12.2019

                                  Thanks Nadezhda