471,605 Members | 1,596 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,605 software developers and data experts.

Simple mechanism for updating database with data from bound datagrid

I'm using the Framework 1.1, so I don't have access to the new
DataGridView object.

What I'm wondering is, is there a really simple way to bind a plain
datagrid to a database in such a way that changes made to cells in the
datagrid call an update on the corresoonding data within a database?
I've looked in vain for a really simple way to do this with minimal
coding, but I'm coming to the conclusion that I will have to trap the
events of the datagrid and do all the dirty work myself.

Any suggestions would be very appreciated.

Greg.

Feb 15 '06 #1
2 1555
Greg,

You are pretty much right. The data model of .NET is a disconnected
one, so if you want to update the database (or know when it is updated), you
will need to put that mechanism in yourself.

As for updating, yes, you will have to determine when the data grid is
changed (you are better off connecting to the dataset itself, and catching
the events on there) and then updating the back end appropriately.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Greg" <gr*************@yahoo.co.uk> wrote in message
news:11*********************@z14g2000cwz.googlegro ups.com...
I'm using the Framework 1.1, so I don't have access to the new
DataGridView object.

What I'm wondering is, is there a really simple way to bind a plain
datagrid to a database in such a way that changes made to cells in the
datagrid call an update on the corresoonding data within a database?
I've looked in vain for a really simple way to do this with minimal
coding, but I'm coming to the conclusion that I will have to trap the
events of the datagrid and do all the dirty work myself.

Any suggestions would be very appreciated.

Greg.

Feb 15 '06 #2
Nicolas,

Thanks for that - that has saved me a lot of time doing more searching!
I'm not too daunted by the solution - I just needed to check that I
wasn't barking up the wrong tree!

Greg.

Feb 15 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

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.