Keeping Data in grid while displaying error message

ninel

Active member
Joined
Mar 23, 2005
Messages
32
Location
Land O Lakes, Florida
Programming Experience
3-5
I have 5 textboxes embedded in a datagrid that require a date format (mm/dd/yy), but can be left empty if user doesn't have date.
User can poplutes these textboxes for multiple records and hit submit button.
On the submit i loop through the grid. If dates are populated AND they are in the correct format then I call a stored procedure that inserts the record into a table.
If any of the dates that are populated in the textbox is not a date or in the incorrect format I need to display error message in a label.
I got all this to work, but if it throws error message all the data in the grid is wiped out.

How can i keep data in each textbox and still display the error message?

Thanks,
Ninel
 
Back
Top