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 6242435
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T11:57:16+00:00 2026-05-24T11:57:16+00:00

sorry if the title is very confusing, but I’m not sure how to really

  • 0

sorry if the title is very confusing, but I’m not sure how to really ask this question. Right now, with my winform i am trying to make an edit function off of a double click event in my data grid view. When i double click a cell, another form pops up for the user to edit. What I want is when the user exits that form, it automatically updates what is in the dgv. I have a search function, and I just want to reuse it again after I exit that form. Here is some code…

        if (combo_View.Text == "Orders")
        {
            DateTime date = new DateTime();
            string PO, item, repack, UPS, wrapping, usage, price, notes, customerName;
            int inOrder, outOrder, oid, palletNum, vid, cid;
            double weight, cf;
            string myIndex = dgv_DataLookup.CurrentCell.OwningRow.Cells[16].Value.ToString();
            DataSet editSet = new DataSet();
            da.SelectCommand = new OleDbCommand("SELECT oid, orderDate, PO, itemNum, InOrder, OutOrder, Repack, UPS, Pallets, PalletWrap, PalletUse, UPSAmount, LBS, CF, NoteOrder, VendorID, CustomerID, CustomerName FROM TestQuery WHERE oid = @oid", cs);
            da.SelectCommand.Parameters.Add("@oid", OleDbType.Integer).Value = myIndex;
            editSet.Clear();
            da.Fill(editSet);
            oid = int.Parse(editSet.Tables[0].Rows[0][0].ToString());
            date = DateTime.Parse(editSet.Tables[0].Rows[0][1].ToString());
            PO = editSet.Tables[0].Rows[0][2].ToString();
            item = editSet.Tables[0].Rows[0][3].ToString();
            inOrder = int.Parse(editSet.Tables[0].Rows[0][4].ToString());
            outOrder = int.Parse(editSet.Tables[0].Rows[0][5].ToString());
            repack = editSet.Tables[0].Rows[0][6].ToString();
            UPS = editSet.Tables[0].Rows[0][7].ToString();
            palletNum = int.Parse(editSet.Tables[0].Rows[0][8].ToString());
            wrapping = editSet.Tables[0].Rows[0][9].ToString();
            usage = editSet.Tables[0].Rows[0][10].ToString();
            price = editSet.Tables[0].Rows[0][11].ToString();
            weight = double.Parse(editSet.Tables[0].Rows[0][12].ToString());
            cf = double.Parse(editSet.Tables[0].Rows[0][13].ToString());
            notes = editSet.Tables[0].Rows[0][14].ToString();
            vid = int.Parse(editSet.Tables[0].Rows[0][15].ToString());
            cid = int.Parse(editSet.Tables[0].Rows[0][16].ToString());
            customerName = editSet.Tables[0].Rows[0][17].ToString();

            Edit editForm = new Edit("ORDER", oid, date, PO, item, inOrder, outOrder, repack, UPS, palletNum, wrapping, usage, price, weight, cf, notes, vid, cid, customerName);
            editForm.Show();
            btn_Search_Click(null, null);

whats happening here is that when the form shows, it calls the btn_search_click before I even do anything to my other form. I was wondering if somehow I can pause the form or make it sleep until I quit the editForm function, and THEN call the search function. Please ask if you need more code or if you want to see the code from the other forms. Thanks!

  • 1 1 Answer
  • 1 View
  • 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-24T11:57:17+00:00Added an answer on May 24, 2026 at 11:57 am

    Change

    editForm.Show();
    

    to

    editForm.ShowDialog();
    

    This will pause execution of the main form until editForm closes.

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

Sidebar

Related Questions

Sorry for a long question and not a very descriptive title, but my problem
Sorry for the vague title, but not quite sure how to summarize this one.
Sorry the title is not very clear. This is a follow up to my
Sorry the title is not very descriptive but it is a tricky problem to
sorry if the title is not very clear. I will try to explain now:
I'm very sorry for the conservative title and my question itself,but I'm lost. The
Sorry if the title is not very clear. I was not sure about the
Sorry if the title was misleading or not very descriptive, but here is what
Sorry the title may not be very clear. Basically I have a wrapper for
Sorry if the title isn't clear enough, but in Javascript you can do this

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.