Help on the following would be much appreciated.
Pre-2003 version of c#

I'm having a problem with saving a changed value in a
bound datagrid control.
The problem is that when I immediately click the
Toolbar "Save" button, the data change is not saved. It
will only save if I leave the cell before I press
the "Save" button.

However, the same code is used in a command button with no
problem at all ie. Pressing the "Save" command button
immediately results in the data being saved as expected.

How can I get the save to work in a Toolbar?

Aside: I created my code initially with the data form
wizard and then created a toolbar with a save button to
replace the command button.

Thanks for any help.

Re: DataGrid Toolbar Save by Eric

Eric
Mon Aug 25 01:41:38 CDT 2003

Try the EndEdit method of the DataGrid before doing any save-operations.

/Eric

"Lech" <leslie.cieslar@corptech.qld.gov.au> wrote in message
news:001201c36aaf$920db9e0$a001280a@phx.gbl...
> Help on the following would be much appreciated.
> Pre-2003 version of c#
>
> I'm having a problem with saving a changed value in a
> bound datagrid control.
> The problem is that when I immediately click the
> Toolbar "Save" button, the data change is not saved. It
> will only save if I leave the cell before I press
> the "Save" button.
>
> However, the same code is used in a command button with no
> problem at all ie. Pressing the "Save" command button
> immediately results in the data being saved as expected.
>
> How can I get the save to work in a Toolbar?
>
> Aside: I created my code initially with the data form
> wizard and then created a toolbar with a save button to
> replace the command button.
>
> Thanks for any help.