Created
September 3, 2013 10:08
-
-
Save derjabkin/6422015 to your computer and use it in GitHub Desktop.
XAF: Enabling Mask on DateEdits in ASP.NET
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class DateTimeMaskController : ViewController<DetailView> | |
{ | |
protected override void OnViewControlsCreated() | |
{ | |
base.OnViewControlsCreated(); | |
foreach (var viewItem in View.Items) | |
{ | |
ASPxDateTimePropertyEditor editor = viewItem as ASPxDateTimePropertyEditor; | |
if (editor != null) | |
editor.ControlCreated += (s, e) => | |
{ | |
ASPxDateTimePropertyEditor dateTimePropertyEditor = (ASPxDateTimePropertyEditor) s; | |
dateTimePropertyEditor.Editor.UseMaskBehavior = true; | |
}; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment