How to control format of data-bound textbox

  • Thread starter Thread starter Jeremy Bradshaw
  • Start date Start date
J

Jeremy Bradshaw

I'm binding a TextBox control to a DateTime element of a DataSet :

EmployeeStartDate.DataBindings.Add("Text", currEmpSet, "EE.EE_SDATE");

This works fine, but whenever I input a date/time into the TextBox it is
always reformatted to a full date/time string. How do I specify a format
mask to give me more control over what is displayed (for example, I may want
date only with no time) ?
Any guidance gratefully received !
 
Jeremy ,

You need to use the Parse and Format methods of the Binding Class
Search the Help files for Binding.Parse Event for an example

Stephen
 
Got it - thanks.

Stephen Muecke said:
Jeremy ,

You need to use the Parse and Format methods of the Binding Class
Search the Help files for Binding.Parse Event for an example

Stephen
 
Back
Top