473,486 Members | 1,850 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Handling failed DataGrid updates to the database

This is a short explanation of our problem:

1. A user modifies a row in a DataGrid which causes the DataGrid to update
the locally cached DataSet.

2. We call dataAdapter.Update(table) to update the database.

3. The update fails because there a table constraint has been breached. (Eg.
The user typed in a value which is not allowed by the SQL Server table).

Now what is supposed to happen? The DataGrid and DataSet are out of sync
with the database. The user has already left the row that was edited!

If you try to do the same thing using SQL Server Enterprise Manager, it
works much more nicely. It will not allow you to leave the current row until
it has been validated and accepted by the database.

How can we achieve similar behaviour?

P.S. In reality we are using an Infragistics UltraWinGrid which is far
superior to the DataGrid.

Regards,
Charlie
Aug 15 '06 #1
0 910

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

Similar topics

3
1710
by: EMW | last post by:
How can I put everything that is in a datagrid into a SQL server database (which should be readable by an PocketPC program)? There is probably a simple solution for it, but as always it is...
0
1772
by: Greenwich Support | last post by:
Hi All, I have a very weird problem which is occurring with a VB.Net app and PostgreSQL 7.3.1. There is a form that has a standard .Net datagrid on it that contains some data from a table in...
7
4848
by: Brian Conway | last post by:
Can anyone give me an example of how I can loop through a datagrid and have it run a stored procedure each time it loops?
9
21625
by: John Kirksey | last post by:
I have a page that uses an in-place editable DataGrid that supports sorting and paging. EnableViewState is turned ON. At the top of the page are several search fields that allow the user to filter...
13
2626
by: Lyners | last post by:
I have a web page writen in ASP.NET that contains some javascript so that when a user presses a button, or edits a certain field in a datagrid, another cell in the datagrid is filled with a value....
4
3098
by: cooltech77 | last post by:
Hi, I am trying to build the following functionality in the datagrid. I have a lot of columns in the datagrid which are being populated from the database and the user needs to scroll...
2
1436
by: shumaker | last post by:
I did have a save button for a datagrid that is bound to a tableadapter, but I wanted to remove the button and instead save updates everytime a user finishes editing a row. So I moved the update...
4
1260
by: Abby | last post by:
Hi all, I have a datagrid which i am using for updating the data to the database. It works fine for single row data however when i have multiple rows(records) associated with the same...
13
2424
by: shookim | last post by:
I don't care how one suggests I do it, but I've been searching for days on how to implement this concept. I'm trying to use some kind of grid control (doesn't have to be a grid control, whatever...
0
7094
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6964
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7173
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6839
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
7305
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...
0
5427
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4863
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3070
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
598
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.