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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T14:43:56+00:00 2026-06-03T14:43:56+00:00

Goal: Once clicking on add or delete button, the datagridview should be refreshed with

  • 0

Goal:
Once clicking on add or delete button, the datagridview should be refreshed with the latest data from document.

Problem:

The datagridview can’t be refreshed
after making changes by deleting or
adding new data.

I’m using binding source that is linked with datagridview’s datasource.

I tried everything with different solution and read advise from different forum but still I can’t solve this problem.

I also tried using these syntax “BindingSource.ResetBindings(false)”, “BindingSource.Refresh()” etc but no result.

Links below:

How to refresh a bindingsource

http://www.eggheadcafe.com/community/aspnet/2/10114324/datagridview-refresh-from-another-form.aspx

http://blogs.msdn.com/b/dchandnani/archive/2005/03/15/396387.aspx

http://bytes.com/topic/c-sharp/answers/812061-problem-refresh-datagridview

    bSrcStock.DataSource = myProductrepository.GetAllProductList();


    dgridStock.DataSource = null;
    dgridStock.DataSource = bSrcStock;
    bSrcStock.ResetBindings(true);


    dgridStock.Columns[0].Width = 101;
    dgridStock.Columns[1].Width = 65;
    dgridStock.Columns[2].Width = 80;
    dgridStock.Columns[3].Width = 120;
    dgridStock.Columns[4].Width = 90;
  • 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-03T14:43:57+00:00Added an answer on June 3, 2026 at 2:43 pm

    I have faced this same issue and found out that the problem is with the initialization of the BindingSource inside a static constructor (The class was a singleton). Upon realizing this, I moved the code to the calling event and it finally worked without needing to assign null or call the clear method. Hope this helps.

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

Sidebar

Related Questions

I'm trying to add a class to an li element once after button is
Goal: Display different context menu if right clicking a row from the listview or
So my goal is once a user clicks on the item from the dropdown
Problem analysis: When I'm clicking a submit button of my html form the function
goal : I want to place a text after the submit button using hook_form_alter.
Goal : After user saves data to my mysql DB, a JSON teaser of
My Goal: Extracting one value from an Excel Range , and verify for these
Can't get this to work. Goal is to create a overflowing scrollable div that
Goal: Allow user to select one or more images from his photo library. Get
Goal: Display the value of the calculation in the html page. problem: After you

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.