views:

632

answers:

0

Hi all,

I am working on C# and .NET. As we know that, the best way to stop users from entering invalid data into an input control is Masked TextBox by which we can assign a predefined mask such as Short DateTime mask(--/--/----)

I have a PropertyGrid and assigned it to an instance of a class which is having properties of DateTime type and some other (e.g., string, Bool ). How can I adopt MaskedTextBox(Which is having short date mask) behavior to a property item (of DateTime type) field in propertygrid? Can I use the instance of a MaskedTextBox and apply it to a Property item field of DateTime ?

Please, suggest me in the same. Thanks in advance.

Cheers,

Kumar.