473,385 Members | 1,465 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.

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 16674
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
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...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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...
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: 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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.