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
245
Mask Input (repeating values)
posted

I am trying to set an input mask for an Ultra Grid column so that I can have a number of comma separated hours, something like "10:00 am, 11:00 am, 12:00 pm" for example. I set the mask for the field as following:

 

e.Layout.Bands[0].Format = "hh:mm TT";
e.Layout.Bands0].MaskInput = "hh:mm tt, hh:mm tt, hh:mm tt, hh:mm tt";
e.Layout.Bands[0].MaskDataMode = Infragistics.Win.UltraWinMaskedEdit.MaskMode.IncludeBoth;
e.Layout.Bands[0].MaskClipMode = Infragistics.Win.UltraWinMaskedEdit.MaskMode.IncludeBoth;
e.Layout.Bands[0.MaskDisplayMode = Infragistics.Win.UltraWinMaskedEdit.MaskMode.IncludeBoth;

In that mask I specified four comma separated HH:MM TT elements while I can actually have one or more of such elements in that string. That mask does not quite work for me b/c it requires to enter all 4 elements before the data changes are commited, otherwise it fails validation. Is there a way to specify a 'repeating' mask of some sort for a column? Or do I have to reinitialize the MaskInput every time the user adds a comma into the field? Thanks!