We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

GridDataBoundGrid - MaskEdit cell type

Hi,

I have a cell which needs to allow the user to enter either 2 or 3 sets of numbers seperated by '-'.

e.g. could be:

10-30
or
2-10-30

The problem with using a Mask such as:

mask.Mask = "##-##-##";

Is that the number's are sometimes 2 digits long and sometimess 1. Furthermore, sometimes the mask should be ##-## and other times ##-##-##.

It seems like I therefore can't use a CellType of MaskEdit but should handle CurrentCellAcceptedChanges and write some code to do checking myself after every key stroke the user does.

Can someone get back with whether this is the recommended approach or there is a better way of achieving this?

1 Reply

AD Administrator Syncfusion Team October 23, 2006 11:29 PM UTC

Hi Vito,

Please try the below mask setting,

// MaskEdit.Mask = "99-99-99";

Let me know if this does not help.
Regards,
Rajagopal

Loader.
Live Chat Icon For mobile
Up arrow icon