Having problems with a mask in C#

Posted by Nard Dog on Stack Overflow See other posts from Stack Overflow or by Nard Dog
Published on 2010-12-28T18:50:33Z Indexed on 2010/12/28 18:53 UTC
Read the original article Hit count: 512

Filed under:
|
|
|

I guess this would be a DevExpress mask, but here is what I have:

var dlEdit = new DevExpress.XtraEditors.Repository.RepositoryItemTextEdit();
dlEdit.Mask.MaskType = MaskType.RegEx;
dlEdit.Mask.EditMask = "\\d{1,10}";

I'm trying to get a number that can be up to 10 digits in length that WILL accept leading 0's, as it is now it will show the leading 0's (ex. 0032421243) until the field is clicked off in which case it removes them. I tried a numeric masktype but same thing only it wouldn't let me enter the 0's to start with at all. I thought this would be my answer but this custom type isn't. Can someone point me in the right direction for what I need? Maybe a different type of mask or something?

© Stack Overflow or respective owner

Related posts about c#

Related posts about devexpress