Solved

How do I tell a DataGridView to perform 'CRUD' on Business Object Collection

Posted on 2009-04-06
2
739 Views
Last Modified: 2012-06-21
Hello,

I have a DataGridView that is bound to a collection of custom business objects (Product) via a BindingSource.  So far I have been able to display the list of the business objects, but what I don't know how to do is to write the code that would for instance insert a new record into the collection from the DGV or update an edited row so that the changes are persisted in the BO's underlying database.  Does anyone have any thoughts on how I might get this done?

Thanks,

Mike C
0
Comment
Question by:MClarkCCR
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 96

Accepted Solution

by:
Bob Learned earned 500 total points
ID: 24083576
I would bind the DataGridView to a BindingList(Of BusinessObject).
0
 
LVL 3

Author Comment

by:MClarkCCR
ID: 24103776
TheLearnedOne,

Thanks for the response.  At the moment I've decided just to give into Microsoft and use their dataset designer and typed datasets to data bind all my controls.  There are just too many hurdles to jump rolling your own collections and trying to create a business layer, too many at least to be helpful for a small app like mine.  I'm a bit more than disappointed, however, as I was hoping to use this app as a good tool for learning how to design software into 3-layers which I could have expanded much easier in the future.

Mike C.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question