|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Editing DataA datagrid is linked to a dataview. The user double-clicks on the grid and the screen changes to a data-input screen. The user makes changes and clicks on a button to accept those changes. The code I have for this is as follows: Try If DataSet1.HasChanges Then DataAdapter1.Update(DataSet1.GetChanges, "Table") DataSet1.AcceptChanges() End If Catch x As Exception MsgBox(x.Message) End Try Problem is that it never goes into the "If" block even though the visual controls are bound to the data fields and user makes changes. The program does not seem to detect that changes were made even though there were. Is there something that I'm doing wrong or missing in my code? Many thanks! Mike. Mike,
Are you sure that is forever, because the data is pushed down by a rowchange in a grid. To force that push down, you need for the datagrid the endcurrentedit http://msdn2.microsoft.com/en-us/library/system.windows.forms.currencymanager.endcurrentedit.aspx I hope this helps, Cor <mfleet1***@yahoo.ca> schreef in bericht Show quoteHide quote news:1153232338.159514.232580@m73g2000cwd.googlegroups.com... > Hi. > > A datagrid is linked to a dataview. The user double-clicks on the grid > and the screen changes to a data-input screen. The user makes changes > and clicks on a button to accept those changes. The code I have for > this is as follows: > > Try > If DataSet1.HasChanges Then > DataAdapter1.Update(DataSet1.GetChanges, "Table") > DataSet1.AcceptChanges() > End If > Catch x As Exception > MsgBox(x.Message) > End Try > > Problem is that it never goes into the "If" block even though the > visual controls are bound to the data fields and user makes changes. > The program does not seem to detect that changes were made even though > there were. > > Is there something that I'm doing wrong or missing in my code? > > Many thanks! > > Mike. >
set up timer start 15 sec past minute
Intermittent 'Out of memory' error The RPC Server is unavailable! Issue Tracker / Process (Project) Flow Management Organize Code How to get client information? Dataset.HasChangesmethod ? Read & WriteMemoryProcess (Adress Space) Problem SorteList Comparer: how to change it on the fly? Detect soundcards on board of your system |
|||||||||||||||||||||||