Filling a masked edit box

wdw

Active member
Joined
Dec 11, 2002
Messages
37
Hello,

Ive got a masked edit box with this mask "##-##-####"
its a date field. Now i want to fill it from the database but i dont know how. I am able to get the date from the database but i cannot bind the date to the masked editbox.

Can someone give me a solution for my problem.

thanks
 
Youll have to use the textboxs Parse and Format events to convert the date into your masks format. Look in the help for either of these events - they have sample on converting Currency to String and back (I think).

Also, you may want to avoid the maskedit box as its not a real .NET control. Check out divils tutorial on how to use regular expressions to validate a controls text.

-nerseus
 
thanks for your reply,
I solved my problem by using te datetimepicker.
I was trying to avoid it but it was just the best solution.
 
Back
Top