Is the textbox databound? If so, you can capture the Format and Parse
events. In the Format event, check the db value for null and display
string.Empty; in the Parse event, check the value in the textbox for
string.Empty and set it to DBNull.
If it's not data bound, can't you just handle it when you unload your
textbox into the dataset?
RobinS.
-----------------------------------
>I have a text box that represents Hours worked, I also have a text box that
> represents Adjusted Hours worked. If user wants to override the Hours
[quoted text clipped - 9 lines]
> Any help would be greatly appreciated, thanks in advance.
> Jackie
Wishing I was skiing mom - 25 Jan 2008 16:53 GMT
The textbox is not databound and I ended up updating the db field only if the
user entered a numeric value otherwise db field was unchanged, as the db
field default is null. This required additional code and additional update
processes that I was hoping I could avoid. I am thinking there must be a
better way, but need to move on from this.
Thanks,
Jackie
> Is the textbox databound? If so, you can capture the Format and Parse
> events. In the Format event, check the db value for null and display
[quoted text clipped - 19 lines]
> > Any help would be greatly appreciated, thanks in advance.
> > Jackie