473,324 Members | 2,002 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,324 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 1651
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Pam Ammond | last post by:
After clicking btnDeleteSize_Click in frmSize, I move to frmSizeDelete, allow deleting a Size using a datagrid, and then return to frmSize and want to update the datagrid in frmSize to reflect the...
5
by: junglist | last post by:
Hi guys, I've been trying to implement an editable datagrid and i have been succesful up to the point where i can update my datagrid row by row. However what used to happen was that once i updated...
1
by: Geraldine Hobley | last post by:
hello, I have put thisup b4, but I think that people have misunderstood the problem, so I will make it clearer. I have a problem updating a dataset that is bound to a datagrid. The code that I...
3
by: lemuel | last post by:
hello everyone. i'm new here at this site so sorry if i may sound like a newb (i really am) i'm using C# by the way. i have a datagrid in my windows form and that datagrid's datasource is bound...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
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...

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.