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

Updating DataTable bound to a DataGridView

Hi,

I've a DataGridView with Datasourse = Datatable.
The problem is that I can't get my last record updated at the database
unless I change the row where I'm editing...
Can anyone explain me why and how can I manage to get rid of this?

By the way, Im' updating with DataAdapter.Update(DataTable)

Thanks in advance
CC
Jul 26 '06 #1
3 5100
Carlos,

Was that in past (version 1.x) the currentmanager.endcurrentedit is it now
the Bindingsource.endedit which is doing the trick to force the rows into
the datasource.

http://msdn2.microsoft.com/en-us/lib...e.endedit.aspx

I hope this helps,

Cor

"Carlos Cruz" <ca*************@gmail.comschreef in bericht
news:u5**************@TK2MSFTNGP06.phx.gbl...
Hi,

I've a DataGridView with Datasourse = Datatable.
The problem is that I can't get my last record updated at the database
unless I change the row where I'm editing...
Can anyone explain me why and how can I manage to get rid of this?

By the way, Im' updating with DataAdapter.Update(DataTable)

Thanks in advance
CC

Jul 27 '06 #2
Cor, I'm having a similar problem. Tried dropping a bindingsource on my
form & used it as the datasource for my datagridview. Assigned my dataset as
datasource for the bindingsource. However, this seems to have no effect --
no rows are displayed (if I use the dataset as the datasource for the grid,
I do have rows). What is the magic step I'm leaving out?

Jeremy
Was that in past (version 1.x) the currentmanager.endcurrentedit is it now
the Bindingsource.endedit which is doing the trick to force the rows into
the datasource.

http://msdn2.microsoft.com/en-us/lib...e.endedit.aspx
Jul 27 '06 #3
Jeremy,

Did you do it like this?

http://www.vb-tips.com/dbpages.aspx?...2-b1ed16424252

Cor

"JeremyGrand" <je****@ninprodata.comschreef in bericht
news:%2***************@TK2MSFTNGP05.phx.gbl...
Cor, I'm having a similar problem. Tried dropping a bindingsource on my
form & used it as the datasource for my datagridview. Assigned my dataset
as datasource for the bindingsource. However, this seems to have no
effect -- no rows are displayed (if I use the dataset as the datasource
for the grid, I do have rows). What is the magic step I'm leaving out?

Jeremy
>Was that in past (version 1.x) the currentmanager.endcurrentedit is it
now the Bindingsource.endedit which is doing the trick to force the rows
into the datasource.

http://msdn2.microsoft.com/en-us/lib...e.endedit.aspx

Jul 28 '06 #4

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

Similar topics

0
by: Bob | last post by:
I have relational integrity set up in my sql server 2005 database that prevents cascading deletes in some cases. I'm using a bound datagrid view and a tablenavigator. When I click the delete...
0
by: Irfan | last post by:
hi, I have a 'TimeSheet' Table in the database that holds data about the time spent by an employee on each project on a particular day. TS_pk Emp_fk Project_fk hrsWorked ...
1
by: Lars E | last post by:
Hi all I have a small problem. I have a datatable with 8 columns. But it is only data in 5 of the columns. Data for the remaing 3 columns is in another dataset. I Want to run trough the...
0
by: D2 | last post by:
Hi All, I have a bound DataGridView control where I wish to add a new row. The simple solution turns out to be add a new row to the underlying datatable object and the changes will automatically...
1
by: weird0 | last post by:
How can i update the data in my database directly through datagridview....? Can anyone tell me the appropriate links and what is the exact event in datagridview that handles it and some explanation...
1
nev
by: nev | last post by:
i have a bound datagridview which has no data yet. it has a bindingnavigator along with it. enable adding, editing & deleting of rows is checked. now here's the scenario... when i run the program,...
0
by: Chet | last post by:
I have a Datagrid that is bound to a Datatable at runtime. I allow the user to select a number of rows using the mouse and then click a button that says "check selected rows", which then cycles...
1
by: JustinD30324 | last post by:
Hello. I have a DataGridView that is bound to a DataTable. If the user types in values for all the columns for the first row, then clicks into a column in the second row (empty), and then clicks...
0
by: Proogeren | last post by:
I have made a service that sends a datatable with person information to a client. In the forms init event I call the service to retreive all persons from my service and displays them in a...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
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...

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.