Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3444522
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T08:55:34+00:00 2026-05-18T08:55:34+00:00

I have a problem and I can’t seem to be able to solve it.

  • 0

I have a problem and I can’t seem to be able to solve it. I thought someone here will be able to help out.

I have a form that has a DataGridView of customers. Now, I want to add several customers to this DataGridView without actually adding them to the database. This is because the client must be able to create a list of clients and when thats done add them all at once.

I have tried this:

string[] array = {"Microsoft", "Redmond", "Something"}
dataGridView.Rows.Add (array);

Now this can’t be done because I get an exception saying something in the lines of you cant add rows programatically to a DataGridView that is data bound.

Now I have also read that this can be solved by using a table adapter to insert the rows instead of directly adding them via. a DGV. But this is also not possible because I use custom headers in the DGV because existing data is fetched via JOIN’s so if I add them via a TableAdapter I get an exception that the it doesn’t match the databases table schema.

Now I am really lost… Anyone know of a (halfway) elegant solution to this problem?

Thank you

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T08:55:35+00:00Added an answer on May 18, 2026 at 8:55 am

    Bind your DGV to a BindingList<YourObject>, where YourObject can be a simple class with properties reflecting your database schema. Initially populate the BindingList from the database, and the DGV will automatically add YourObject instances to the list. When you’re ready to commit the changes, do so manually from the BindingList.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a weird date rounding problem that hopefully someone can solve. My client
I have a problem that I can't seem to solve. I have table: Software
I have a script that constantly segfaults - the problem that I can't solve
I have a problem that I can't seem to resolve. I'm sure it's simple,
I have another problem I can't seem to solve..., or find on this site...
I have the problem that an specific step in Ant can only be executed
Well here's my problem I have three tables; regions, countries, states. Countries can be
I need some ideas on how I can best solve this problem. I have
I'll try to explain my problem the best I can, here goes: I have
I have a problem that can essentially be viewed as a graph. I'm considering

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.