468,511 Members | 1,634 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,511 developers. It's quick & easy.

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 16431
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Arne Beruldsen | last post: by
2 posts views Thread by Steve Richter | last post: by
3 posts views Thread by =?Utf-8?B?THVib21pcg==?= | last post: by
7 posts views Thread by =?Utf-8?B?TG9zdEluTUQ=?= | last post: by
3 posts views Thread by Marco Pais | last post: by
1 post views Thread by fmendoza | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.