• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 707
  • Last Modified:

DataGridView with unbound field

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?
0
kpkirishy
Asked:
kpkirishy
2 Solutions
 
planoczCommented:
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,

http://msdn2.microsoft.com/en-us/vbasic/ms789075.aspx#data
0
 
Bob LearnedCommented:
Here is an example of creating a DataGridView in unbound mode:

How to: Create an Unbound Windows Forms DataGridView Control
http://msdn2.microsoft.com/en-us/library/zf3zx9fy.aspx

Bob
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now