PC Review


Reply
Thread Tools Rate Thread

DataGrid Toolbar Save

 
 
Lech
Guest
Posts: n/a
 
      25th Aug 2003
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.
 
Reply With Quote
 
 
 
 
Eric Quist
Guest
Posts: n/a
 
      25th Aug 2003
Try the EndEdit method of the DataGrid before doing any save-operations.

/Eric

"Lech" <(E-Mail Removed)> wrote in message
news:001201c36aaf$920db9e0$(E-Mail Removed)...
> 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.



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Save Toolbar into new toolbar deniseandgavin@gmail.com Microsoft Excel Misc 2 4th Mar 2008 11:16 AM
Toolbar changes don't save =?Utf-8?B?SnVkaVc=?= Microsoft Outlook Discussion 2 22nd Jun 2007 06:43 AM
Can't save the changes to my toolbar =?Utf-8?B?TWFyZ2FyZXRCYXJ0bGV5?= Microsoft Access 3 13th Nov 2006 06:55 PM
Toolbar does not save =?Utf-8?B?SG93aWU=?= Microsoft Word Document Management 1 1st Feb 2005 09:03 PM
Cannot save IE toolbar changes =?Utf-8?B?VHJldm9sdA==?= Windows XP Internet Explorer 2 28th Feb 2004 09:42 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:41 AM.