473,394 Members | 1,960 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

commit changes earlier

Gav
Hi all,

I have a datagrid which is populated by a dataset, I have some code to
update the database etc... If I enter a value into the datagrid and hit the
save button it saves the old value not the one just entered, I have to make
sure I take the focus from the cell and wait a few seconds before i save it.

Is there a way i can speed this up so it saves the correct value?

Thanks
Gav
Nov 17 '05 #1
2 1691
Gav,

You don't have to wait a few seconds, you should just shift focus from
the cell.

Also, if you want to force the edit to complete, then you can get the
view on the current row being edited (through the currency manager for the
data source the grid is bound to) and call the EndEdit method on that. This
should commit the changes and cause the correct new value to be committed.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Gav" <sp**@spam.com> wrote in message
news:OQ**************@tk2msftngp13.phx.gbl...
Hi all,

I have a datagrid which is populated by a dataset, I have some code to
update the database etc... If I enter a value into the datagrid and hit
the save button it saves the old value not the one just entered, I have to
make sure I take the focus from the cell and wait a few seconds before i
save it.

Is there a way i can speed this up so it saves the correct value?

Thanks
Gav

Nov 17 '05 #2
Gav
I still appear to be having problems with this... at the minute before I do
anything I loop through all the rows in the dataset and call EndEdit but
still I'm still not getting the correct value unless I change focus and
still wait a couple of seconds.

Anymore help would be much appreciated
Thanks
Gav

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:OK**************@TK2MSFTNGP10.phx.gbl...
Gav,

You don't have to wait a few seconds, you should just shift focus from
the cell.

Also, if you want to force the edit to complete, then you can get the
view on the current row being edited (through the currency manager for the
data source the grid is bound to) and call the EndEdit method on that.
This should commit the changes and cause the correct new value to be
committed.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Gav" <sp**@spam.com> wrote in message
news:OQ**************@tk2msftngp13.phx.gbl...
Hi all,

I have a datagrid which is populated by a dataset, I have some code to
update the database etc... If I enter a value into the datagrid and hit
the save button it saves the old value not the one just entered, I have
to make sure I take the focus from the cell and wait a few seconds before
i save it.

Is there a way i can speed this up so it saves the correct value?

Thanks
Gav


Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: chandan | last post by:
hi, I have a insert trigger on a table. I want commit to happen after insert before invoking the trigger. So that if a quey is made before the completion of the trigger.Modified Data should be...
11
by: Markus Breuer | last post by:
I have a question about oracle commit and transactions. Following scenario: Process A performs a single sql-INSERT into a table and commits the transaction. Then he informs process B (ipc) to...
8
by: Martin Staael | last post by:
When doing a UPDATE on a very large table it can take quite a long time due to the commit/rollback option. Is there any way on the client side to disable the commit/rollback option so that UPDATE...
2
by: janet | last post by:
HI, I had a question on auto-commit in DB2 EEE V8 on AIX V5. Here is my example.. there are two script A.sh , B.SQL A.sh is following:
2
by: harborboy76 | last post by:
Hi, I had posted one topic earlier, but somehow the link has been broken and I cannot see the topic. So sorry if this is a duplicate topic for some. Here is the issue that I'm running into....
1
by: Mark Day | last post by:
Hi all, I am running some sql from Access 2000 to an existing Oracle 8i database using the "INSERT INTO 'connection string for Oracle' etc etc. then the docmd.runSQL which works fine. However I...
1
by: K.Kishore | last post by:
Hi all, For a ms access database is there any facility like 'commit' like activity.. to modify/delete changing records. Any vbs code can we do in forms..? -kish
0
by: Pouria | last post by:
Hi, I would like to load data from a table in my database into a gridview, modify the gridview (without my changes being commited to the database), and commit my (potentially many changes e.g....
0
by: Jim Kennedy | last post by:
ALL DDL does a commit. Hence Drop Table movies; issues a commit. True you don't issue a commit and the driver does not issue a commit, but the server does for all DDL. That is probably where...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.