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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T21:05:56+00:00 2026-06-05T21:05:56+00:00

I have a large dataset that load in with a fill method on page

  • 0

I have a large dataset that load in with a fill method on page load.

Then, a record can be added to the dataset.

All of that works fine, but the only way that I can get the bindingsource to recognize the new record is to do a fill method. This also works but is a perfomance problem. Why does the binding source not see the new record in the dataset?

Mainform Code. Works Great.

         DialogResult returnFormVal;

        Schedulers.DataSets.SchedOneFetch.WOMainFetchRow newRow = schedOneFetch.WOMainFetch.NewWOMainFetchRow();

        Schedulers.Forms.NewWorkOrder genReport = new Schedulers.Forms.NewWorkOrder(ref newRow);

        Int32 picNumber;

        returnFormVal = genReport.ShowDialog();

        schedOneFetch.WOMainFetch.Rows.Add(newRow);

        wOMainFetchBindingSource.EndEdit();

        wOMainFetchTableAdapter.Adapter.Update(schedOneFetch.WOMainFetch);

        Int32 passBackVal = newRow.DISID;

SubForm code. Also works great.

            passBackRow.DISDueDate = monthCalendar1.SelectionStart;

            passBackRow.DISID = 99999999;

            if (ckbEqpt.Checked == true & lbProcNum.Items.Count > 0)
            {
                passBackRow.DISEquip = Convert.ToInt32(lbProcNum.SelectedValue.ToString());
            }
            else
            {
                passBackRow.DISEquip = 0;
            }


            passBackRow.DISLineNumber = Convert.ToInt32(lbLineName.SelectedValue.ToString());

            passBackRow.DISManHours = Convert.ToInt32(nudEstTotTime.Value);

            passBackRow.DISNumberAss = Convert.ToInt32(nudEstTM.Value);

            passBackRow.DISOpenDate = DateTime.Now;

            passBackRow.DISOriginator = userID.DBUserID;

            passBackRow.DISRequestor = 0;

            passBackRow.DISResponsible = Convert.ToInt32(lbRespons.SelectedValue.ToString());

            passBackRow.DISType = Convert.ToInt32(lbType.SelectedValue.ToString());

            passBackRow.DISWorkAccomp = "";

            passBackRow.DISWorkRequired = rtbWorkReq.Text;

            passBackRow.MLID = 0;

            passBackRow.LIID = 0;

            passBackVal = 0;

            this.Close();

Return control to main form. The new record has been added to the database.

                wOMainFetchBindingSource.Position = wOMainFetchBindingSource.Find("DISID", passBackVal);


            DataRowView dtaRow = (DataRowView)wOMainFetchBindingSource.Current;

            String woID = dtaRow["DISID"].ToString();

FAIL! The bindingsource wont find the the new record, returns a -1 on the find and defaults to the first record in the dataset.

If I put the .fill method in between the dialog and the main page then it all works fine, but takes a loooonnng time to do the fill… seven or eight seconds.

I guess my understanding of the binding source is disfunctional, I had assumed that if the underlying dataset was updated then the bindingsource would see it.

So, first if someone has a suggestion on how to refresh the binding source without the fill I would appreciate it, and if someone can explain why this works the way it does I might be able to find a workaround.

Thanks

  • 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-06-05T21:05:58+00:00Added an answer on June 5, 2026 at 9:05 pm

    My understanding of the Bindingsource was correct, it was seeing the new record added. The issue is that the Dataset gets its information from a view. The add new method only populates the fields in the base table. The other fields, the ones assembled by the View, arent populated until the tableadapter re-reads by using the fill method. I dont see a way around this other than filling each of the fields of the new record, big drawback is that whenever the view or any of the tables assembled in the view are changed you would have to make sure to change the code. I will instead reduce the number of records being loaded on each fill.

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

Sidebar

Related Questions

i have a page that displays large datasets into html tables. how can i
I have a large dataset (over 100,000 records) that I wish to load into
I have a large dataset that I am dealing with in Python. It is
Imagine you have a large dataset that may or may not be filtered by
I have a large dataset with documents that sometimes cross-reference each other, sometimes do
I have a large dataset (202k points). I know that there are 8 values
I have a large dataset that I need to divide randomly into 5 almost
I have a large dataset that needs to be displayed for users and looking
I have a large dataset (about 1.1M documents) that I need to run mapreduce
I have a fairly large dataset (~1.4m rows) that I'm doing some splitting and

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.