473,322 Members | 1,736 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,322 software developers and data experts.

Database & Datagrid issues

Hello I am having a problem with using the datagrid.
I am attaching my data through a dataset via code to a
datagridview.datasource.
All if fine except if I make any changes to the datagrid the changes never
reflect in the database.

Does anybody have a sample/example of how to use the datagridview with code
not the wizard?

thanks
Nov 13 '06 #1
2 1016
You'll need to update the database with the changes made to the
datatable the grid is bound too.

Check out DataTable.GetChanges() method to get a copy of the changes
that were made since the table loaded or since the
DataTable.AcceptChanges() method was last called.

Izzy

Warex wrote:
Hello I am having a problem with using the datagrid.
I am attaching my data through a dataset via code to a
datagridview.datasource.
All if fine except if I make any changes to the datagrid the changes never
reflect in the database.

Does anybody have a sample/example of how to use the datagridview with code
not the wizard?

thanks
Nov 13 '06 #2
Warex,

If you want to use the Datagrid than you should not connect to the
DataGridView.Datasource,

Use the DataGrid.Datasource.

Cor

"Warex" <Ig************@juno.comschreef in bericht
news:OZ**************@TK2MSFTNGP02.phx.gbl...
Hello I am having a problem with using the datagrid.
I am attaching my data through a dataset via code to a
datagridview.datasource.
All if fine except if I make any changes to the datagrid the changes never
reflect in the database.

Does anybody have a sample/example of how to use the datagridview with
code not the wizard?

thanks

Nov 14 '06 #3

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

Similar topics

1
by: Patrick Demets | last post by:
I have a fairly simple form with databound text boxes, but changes (or new records) are not recognized. The text boxes are successfully populated with data (from the database) and I can cycle...
2
by: Steve Chatham | last post by:
How do you make a sort work in ascending & descending order on the column in a datagrid. I have it now where it'll return the numbers from lowest to highest. SC
3
by: elziko | last post by:
I have a DataTable bound to a DataGrid. When a user clicks on a row on the DataGrid I use: MyDataTable.Rows(MyDatagrid.CurrentRowIndex).Item(0) to do some work with the value in the first cell...
26
by: Jimmy | last post by:
ill have a database with 1 table and 3 fields: ID FIRSTNAME LASTNAME (the ID field will be the auto incrementing index) there might be 10 records in the DB, there might be 10,000. i...
2
by: Mike Baugh | last post by:
I am using visual studio 2005 to develop a form using c# I have 3 datagrids on one form. I can set the row color based on a certain value in a column. However this color applies to all 3...
7
by: GaryDean | last post by:
(one of our developers posted this and it got no answer so I'm giving it another try) I'm converting a DataGrid utility component that previously used the columns array to function as it has in...
12
by: InvalidLastName | last post by:
We have been used XslTransform. .NET 1.1, for transform XML document, Dataset with xsl to HTML. Some of these html contents contain javascript and links. For example: // javascript if (a &gt; b)...
9
by: =?Utf-8?B?TUNN?= | last post by:
I'm sure the answer to my question varies depending on the situation, but I am looking for a general "best practice". If I have an asp.net application and I load certain data from a database,...
2
tjc0ol
by: tjc0ol | last post by:
Hi guys, Im just wondering that I cannot update my database throught datagrid datalist control, and the only thing works is that I can delete, cancel, edit but when I clicked update link...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.