DataGridView with unbound field

Posted on 2007-07-23
Last Modified: 2013-11-26
I have a DataGridView on a form.  I would like this DataGridView to be populated with 4 Fields.
1. Posted
2. Invoice #
3. Invoice Date
4. Total

The last three fields invoice #, Invoice Date and Total are all stored in the invoices Table but my first field which I added is not stored anywhere.  Posted is a check box field in the datagridview.

I also have a submit button.  I would like to be able to check the posted field in the datagridview and when I click on the submit button copy the rows where posted = true to another table.  How can I accomplish this?

I have the datagridview all created with the posted field but that is as far as i got.

Should I create a datatable with matching schema of the datagridview and then somehow populate that? or should I bind the datagridview to my invoices table?  if i bind my datagridview to my invoices table then how do i detect the posted field?
Question by:kpkirishy
    LVL 27

    Accepted Solution

    Hi kpkirishy,
    This microsoft link of 101 samples has a good dataview sample that shows you how to add the first column that is not with your database data; that is loading into the datagridview,
    LVL 96

    Assisted Solution

    by:Bob Learned
    Here is an example of creating a DataGridView in unbound mode:

    How to: Create an Unbound Windows Forms DataGridView Control


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
    It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    737 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

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now