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

DataGridView UpDate Datasource

Bob
Hi,
FrameWork 2.0
Quick and dirty job so I thought I would do it all on the UI as quick and
easy as possible.
I got the datagridview to display my Access databaseview by using the
Datasources and dragging the exposed view onto the datagrid as per the help
instructions
I can't get edits to go back to the database.
I have tried editing cells at the UI and also programatically.
With a UI edit the pencil comes up and goes away when I move off the record
but the update does not automatically pass through to the underlying table.

With the prog update the UI does not even show the new values after the code
completes.

The underlying Access query supports updates as when I use it in the access
database I can change values.
I simply want to iterate through the rows of the dgv do some alterations and
save the data.

What am I missing?
Button Click example snippet follows:
Thanks
Bob
foreach (DataGridViewRow n in this.dgV1.Rows)

{

//Stuff deleted;

n.Cells[3].Value = 999; //example only

}

I then hit the F2 Key but no effect.

I have tried dgv.Refresh

test of underlying bindingsource.Allowedit property shows true

Oct 24 '06 #1
3 16661
Bob
Hi,
The underlying System Generated table adapter is not exposing an update
method.
I then used the same methodology to create a dgv based on the table
underlying the Access query
Its TableAdapter does expose the update method.
The problem is I need the sort to work out the alterations.
Anyway out of this?
Bob

"Bob" <bo*@nowhere.comwrote in message
news:uM**************@TK2MSFTNGP04.phx.gbl...
Hi,
FrameWork 2.0
Quick and dirty job so I thought I would do it all on the UI as quick and
easy as possible.
I got the datagridview to display my Access databaseview by using the
Datasources and dragging the exposed view onto the datagrid as per the
help
instructions
I can't get edits to go back to the database.
I have tried editing cells at the UI and also programatically.
With a UI edit the pencil comes up and goes away when I move off the
record
but the update does not automatically pass through to the underlying
table.
>
With the prog update the UI does not even show the new values after the
code
completes.

The underlying Access query supports updates as when I use it in the
access
database I can change values.
I simply want to iterate through the rows of the dgv do some alterations
and
save the data.

What am I missing?
Button Click example snippet follows:
Thanks
Bob
foreach (DataGridViewRow n in this.dgV1.Rows)

{

//Stuff deleted;

n.Cells[3].Value = 999; //example only

}

I then hit the F2 Key but no effect.

I have tried dgv.Refresh

test of underlying bindingsource.Allowedit property shows true



Oct 24 '06 #2
Bob, I am having the same problem and I cannot find an answer to it. Any luck?
"Bob" wrote:
Hi,
The underlying System Generated table adapter is not exposing an update
method.
I then used the same methodology to create a dgv based on the table
underlying the Access query
Its TableAdapter does expose the update method.
The problem is I need the sort to work out the alterations.
Anyway out of this?
Bob

"Bob" <bo*@nowhere.comwrote in message
news:uM**************@TK2MSFTNGP04.phx.gbl...
Hi,
FrameWork 2.0
Quick and dirty job so I thought I would do it all on the UI as quick and
easy as possible.
I got the datagridview to display my Access databaseview by using the
Datasources and dragging the exposed view onto the datagrid as per the
help
instructions
I can't get edits to go back to the database.
I have tried editing cells at the UI and also programatically.
With a UI edit the pencil comes up and goes away when I move off the
record
but the update does not automatically pass through to the underlying
table.

With the prog update the UI does not even show the new values after the
code
completes.

The underlying Access query supports updates as when I use it in the
access
database I can change values.
I simply want to iterate through the rows of the dgv do some alterations
and
save the data.

What am I missing?
Button Click example snippet follows:
Thanks
Bob
foreach (DataGridViewRow n in this.dgV1.Rows)

{

//Stuff deleted;

n.Cells[3].Value = 999; //example only

}

I then hit the F2 Key but no effect.

I have tried dgv.Refresh

test of underlying bindingsource.Allowedit property shows true



Jan 26 '07 #3
If you are using SQL Express, make sure you are updating the right copy of
the database. Check out this link:

http://msdn2.microsoft.com/en-us/lib...89(VS.80).aspx

Robin S.
----------------------------------------------
"Chris" <Ch***@discussions.microsoft.comwrote in message
news:EE**********************************@microsof t.com...
Bob, I am having the same problem and I cannot find an answer to it. Any
luck?
"Bob" wrote:
>Hi,
The underlying System Generated table adapter is not exposing an update
method.
I then used the same methodology to create a dgv based on the table
underlying the Access query
Its TableAdapter does expose the update method.
The problem is I need the sort to work out the alterations.
Anyway out of this?
Bob

"Bob" <bo*@nowhere.comwrote in message
news:uM**************@TK2MSFTNGP04.phx.gbl...
Hi,
FrameWork 2.0
Quick and dirty job so I thought I would do it all on the UI as quick
and
easy as possible.
I got the datagridview to display my Access databaseview by using the
Datasources and dragging the exposed view onto the datagrid as per the
help
instructions
I can't get edits to go back to the database.
I have tried editing cells at the UI and also programatically.
With a UI edit the pencil comes up and goes away when I move off the
record
but the update does not automatically pass through to the underlying
table.
>
With the prog update the UI does not even show the new values after
the
code
completes.

The underlying Access query supports updates as when I use it in the
access
database I can change values.
I simply want to iterate through the rows of the dgv do some
alterations
and
save the data.

What am I missing?
Button Click example snippet follows:
Thanks
Bob
foreach (DataGridViewRow n in this.dgV1.Rows)

{

//Stuff deleted;

n.Cells[3].Value = 999; //example only

}

I then hit the F2 Key but no effect.

I have tried dgv.Refresh

test of underlying bindingsource.Allowedit property shows true





Jan 29 '07 #4

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

Similar topics

2
by: bob | last post by:
Can anyone tell me the best way to update a dataset while it is being edited/viewed in the DataGridView control? Is this something that should be inserted into one of the grid's events? or should...
11
by: Kevin | last post by:
I've been searching forever for examples of saving data changes in a DataGridView. There's all kinds of examples, but none really show how to save changes. Someone please help me. I have a...
4
by: Arne Beruldsen | last post by:
I just can't seem to get the datagridview to update. I'm using 2005 vb.net Here's my code for loading the grid (works fine) and my attempt at updating via a save button... Private SxAdapter...
2
by: Steve Richter | last post by:
what is the best way to use DataGridView to view data from large database tables? Where the sql select statement might return millions of rows? string connectionString =...
3
by: =?Utf-8?B?THVib21pcg==?= | last post by:
Hi, I have a DataGridView that displays data from one table from database. I didn’t implement any my code, I just used wizard to do all the work with DatagridView populating. Visual Studio...
7
by: =?Utf-8?B?TG9zdEluTUQ=?= | last post by:
Hi All :) I'm converting VB6 using True DBGrid Pro 8.0 to VB2005 using DataGridView. True DBGrid has a MultipleLines property that controls whether individual records span multiple lines. Is...
11
by: dave18 | last post by:
Hello all! I found a solution to my original question, but there's still so much I don't understand about it, I thought I'd give this forum a try. At the very least, maybe it will help someone...
3
by: Marco Pais | last post by:
Hi there. I have a DataGridView on a desktop application and it's being filled through the use of a Web Service, wich returns a DataSet. The I use datagrid.DataSource=mydataset.tables to bind...
1
nev
by: nev | last post by:
Happy Easter to all! I have a problem with a datagridview. I placed code in a button click event as follows: dim dtt as datatable = dataset.employees.copy dtt.DefaultView.RowFilter = "='" &...
1
by: Arved Sandstrom | last post by:
This seems to be something so simple that none of the hundred-odd tutorials and forum threads that I have looked at (:-)) apparently thinks it's a problem. In a nutshell, I have two...
1
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
0
by: veera ravala | last post by:
ServiceNow is a powerful cloud-based platform that offers a wide range of services to help organizations manage their workflows, operations, and IT services more efficiently. At its core, ServiceNow...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: mar23 | last post by:
Here's the situation. I have a form called frmDiceInventory with subform called subfrmDice. The subform's control source is linked to a query called qryDiceInventory. I've been trying to pick up the...
2
by: jimatqsi | last post by:
The boss wants the word "CONFIDENTIAL" overlaying certain reports. He wants it large, slanted across the page, on every page, very light gray, outlined letters, not block letters. I thought Word Art...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...

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.