Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hello,

 

I've got a masked edit box with this mask "##-##-####"

it's a date field. Now i want to fill it from the database but i don't 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

  • *Experts*
Posted

You'll have to use the textbox's Parse and Format events to convert the date into your mask's 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 it's not a real .NET control. Check out divil's tutorial on how to use regular expressions to validate a control's text.

 

-nerseus

"I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
Posted

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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...