By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
439,993 Members | 1,883 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 439,993 IT Pros & Developers. It's quick & easy.

bound textbox update source

P: n/a
Hopefully this is the correct group for this message. My
previous post to (I assume) a non-.net group was not
welcomed.

I have a form with 7 text boxes that are all bound to
fields of a dataset. The form also contains a datagrid
also bound to the same dataset.

I have a button on the form to update the data to the
source.

1) If I change data in a row of the grid and hit the save
button it updates the source.

2) If I change data in a textbox and hit the button it
does not update the source although the cell on the
datagrid changes to the new value as soon as I exit the
textbox.

3) If I change the value in the textbox and then click
anywhere on the grid (not neccessarily on the applicable
row or cell) and then press the sabe button the source is
updated.

Any idea why the textbox only method 2) doesn't work?

Thanks.

Nov 20 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
Try Updating the Database with the Update Method in the 'Leave' event for
one of the text boxes. Then alter the data and tab out of it, see if this
works.

Regards - OHM

Frank wrote:
Hopefully this is the correct group for this message. My
previous post to (I assume) a non-.net group was not
welcomed.

I have a form with 7 text boxes that are all bound to
fields of a dataset. The form also contains a datagrid
also bound to the same dataset.

I have a button on the form to update the data to the
source.

1) If I change data in a row of the grid and hit the save
button it updates the source.

2) If I change data in a textbox and hit the button it
does not update the source although the cell on the
datagrid changes to the new value as soon as I exit the
textbox.

3) If I change the value in the textbox and then click
anywhere on the grid (not neccessarily on the applicable
row or cell) and then press the sabe button the source is
updated.

Any idea why the textbox only method 2) doesn't work?

Thanks.


--
Best Regards - OHM

O_H_M{at}BTInternet{dot}com
Nov 20 '05 #2

P: n/a
Nope.
Only thing that works is if the datagrid gets focus before save button
pressed.
I even deleted the grid and left the text boxes - that didn't work either.
On the leave event of textbox I set focus to the grid and then back to the
next textbox. Only got a buffer overflow error.

Frank
"One Handed Man [ OHM# ]" <O_H_M{at}BTInternet{dot}com> wrote in message
news:uO*************@TK2MSFTNGP11.phx.gbl...
Try Updating the Database with the Update Method in the 'Leave' event for
one of the text boxes. Then alter the data and tab out of it, see if this
works.

Regards - OHM

Frank wrote:
Hopefully this is the correct group for this message. My
previous post to (I assume) a non-.net group was not
welcomed.

I have a form with 7 text boxes that are all bound to
fields of a dataset. The form also contains a datagrid
also bound to the same dataset.

I have a button on the form to update the data to the
source.

1) If I change data in a row of the grid and hit the save
button it updates the source.

2) If I change data in a textbox and hit the button it
does not update the source although the cell on the
datagrid changes to the new value as soon as I exit the
textbox.

3) If I change the value in the textbox and then click
anywhere on the grid (not neccessarily on the applicable
row or cell) and then press the sabe button the source is
updated.

Any idea why the textbox only method 2) doesn't work?

Thanks.


--
Best Regards - OHM

O_H_M{at}BTInternet{dot}com

Nov 20 '05 #3

P: n/a
Look,
This needs to be debugged with method I think.

Trap the leave event of this text box and have it print out in the debug
window all the rows. This way you will at least see if your DataTable is
being updated with the new data in the textbox.

I dont have time to reconstruct this at the moment, but I would suggest that
if this does not work, you should repost in the ADONET newsgroup, this is
likely to yeild a fast response.

Regards - OHM

Fitwedertubugter wrote:
Nope.
Only thing that works is if the datagrid gets focus before save button
pressed.
I even deleted the grid and left the text boxes - that didn't work
either. On the leave event of textbox I set focus to the grid and
then back to the next textbox. Only got a buffer overflow error.

Frank
"One Handed Man [ OHM# ]" <O_H_M{at}BTInternet{dot}com> wrote in
message news:uO*************@TK2MSFTNGP11.phx.gbl...
Try Updating the Database with the Update Method in the 'Leave'
event for one of the text boxes. Then alter the data and tab out of
it, see if this works.

Regards - OHM

Frank wrote:
Hopefully this is the correct group for this message. My
previous post to (I assume) a non-.net group was not
welcomed.

I have a form with 7 text boxes that are all bound to
fields of a dataset. The form also contains a datagrid
also bound to the same dataset.

I have a button on the form to update the data to the
source.

1) If I change data in a row of the grid and hit the save
button it updates the source.

2) If I change data in a textbox and hit the button it
does not update the source although the cell on the
datagrid changes to the new value as soon as I exit the
textbox.

3) If I change the value in the textbox and then click
anywhere on the grid (not neccessarily on the applicable
row or cell) and then press the sabe button the source is
updated.

Any idea why the textbox only method 2) doesn't work?

Thanks.


--
Best Regards - OHM

O_H_M{at}BTInternet{dot}com


--
Best Regards - OHM

O_H_M{at}BTInternet{dot}com
Nov 20 '05 #4

P: n/a
Thanks.
I took your advise and checked out ADONET group. It seems I am not the only
one to have this problem or a similar one.

The workaround was to put code just before the update action that would move
one position positive in the dataset and then one position negative then
call the udate. That way I am still on the same record after the update.
I am used to having to devise workarounds with this Microsoft stuff.
Thanks again.
"One Handed Man [ OHM# ]" <O_H_M{at}BTInternet{dot}com> wrote in message
news:u3*************@tk2msftngp13.phx.gbl...
Look,
This needs to be debugged with method I think.

Trap the leave event of this text box and have it print out in the debug
window all the rows. This way you will at least see if your DataTable is
being updated with the new data in the textbox.

I dont have time to reconstruct this at the moment, but I would suggest that if this does not work, you should repost in the ADONET newsgroup, this is
likely to yeild a fast response.

Regards - OHM

Fitwedertubugter wrote:
Nope.
Only thing that works is if the datagrid gets focus before save button
pressed.
I even deleted the grid and left the text boxes - that didn't work
either. On the leave event of textbox I set focus to the grid and
then back to the next textbox. Only got a buffer overflow error.

Frank
"One Handed Man [ OHM# ]" <O_H_M{at}BTInternet{dot}com> wrote in
message news:uO*************@TK2MSFTNGP11.phx.gbl...
Try Updating the Database with the Update Method in the 'Leave'
event for one of the text boxes. Then alter the data and tab out of
it, see if this works.

Regards - OHM

Frank wrote:
Hopefully this is the correct group for this message. My
previous post to (I assume) a non-.net group was not
welcomed.

I have a form with 7 text boxes that are all bound to
fields of a dataset. The form also contains a datagrid
also bound to the same dataset.

I have a button on the form to update the data to the
source.

1) If I change data in a row of the grid and hit the save
button it updates the source.

2) If I change data in a textbox and hit the button it
does not update the source although the cell on the
datagrid changes to the new value as soon as I exit the
textbox.

3) If I change the value in the textbox and then click
anywhere on the grid (not neccessarily on the applicable
row or cell) and then press the sabe button the source is
updated.

Any idea why the textbox only method 2) doesn't work?

Thanks.

--
Best Regards - OHM

O_H_M{at}BTInternet{dot}com


--
Best Regards - OHM

O_H_M{at}BTInternet{dot}com

Nov 20 '05 #5

P: n/a
Cor
Hi Frank,

Did you already look at the currencymanager.endcurrentedit ?

Maybe this wil resolve your problem.

Cor
Nov 20 '05 #6

P: n/a
I'm just learning this stuff and I couldn't figure out how to invoke
currencymanager but I did get this to work:

Me.BindingContext(DsVendors1, "Vendors").EndCurrentEdit()
Me.daVendors.Update(DsVendors1, "Vendors")

and it's cleaner than the workaround I had devised.

Thanks !!!
"Cor" <no*@non.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Hi Frank,

Did you already look at the currencymanager.endcurrentedit ?

Maybe this wil resolve your problem.

Cor

Nov 20 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.