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

  • SEARCH
  • Home
  • 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 7623545
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T04:44:00+00:00 2026-05-31T04:44:00+00:00

This is a pretty small program, so I just used the autogenerated code for

  • 0

This is a pretty small program, so I just used the autogenerated code for my datasource and dragged/dropped a datagridview on my WinForm. I’m trying to manually update a column in a row, but it fails each time I get to the “UpdateAll” of my tablemanager. Here’s my code for double click of cell content:

    private void dgv1DataGridView_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e)
    {
        try
        {
            string delMemberID = dgv1DataGridView.Rows[e.RowIndex].Cells[0].Value.ToString();
            ds1DataSet.Table1.Rows[ds1DataSet.Table1.Rows.IndexOf(ds1DataSet.Table1.FindByMemberID(delMemberID))][9] = MemberID.ToString();
            this.Validate();
            this.bs1BindingSource.EndEdit();
            this.tableAdapterManager.UpdateAll(this.ds1DataSet);
            MessageBox.Show("Replacement Successful");
            this.Close();
        }
        catch
        {
            MessageBox.Show("Replacement Failed");
        }
    }

My expectations are; when a user double clicks anywhere inside a row of the datagridview, it will update that row with a different “MemberID” for that column, save the data everywhere (including database), and then close the form (to return the parent form).

  • 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-31T04:44:01+00:00Added an answer on May 31, 2026 at 4:44 am

    For some reason, my tableAdapterManager wasn’t linked to my TableAdapter on that form – once I linked them, the above code worked fine.

    To be more precise, I clicked on the design view of my form and clicked the the tableAdapterManager at the bottom of the design window. Then looking in the “Properties” window, I noticed that the TableAdapter was blank (if you used a wizard to create the DataSource, then it will be named the same as the table in your DataSource). Once I selected the correct name for the TableAdapter, everything worked perfect.

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

Sidebar

Related Questions

I am trying to understand some code. It is a small program that prints
I'm trying to create a small program to run on a centralized device. This
This is pretty simple, I come from a swing/awt background. I'm just wondering what
This pretty much has me defeated. On XP and earlier versions of Windows you
this pretty much is the thing. When in tinymce I press anything that is
I find this pretty confusing. When you want to rotate a view, it's going
I'm stuck with this pretty silly thing; I got a textfile like this; Hello::140.0::Bye
I have written something like this pretty easily in C# ( string GetUrl(new {
Seems I've outdone myself. All the while I was creating this pretty little 'latest
This is pretty weird. I have my Profiler open and it obviously shows that

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.