WinForms DataGridView Not Updating After Binding Source Changes - Needs Refresh
I just started working with I'm integrating two systems and I'm experiencing an issue with a `DataGridView` in my WinForms application where it doesn't update its display after changing the underlying `BindingSource`... I have set up my project using .NET Framework 4.8 and am using a simple `List<MyCustomObject>` for data binding. When I modify the list and reassign it to the `BindingSource`, the `DataGridView` does not reflect these changes unless I explicitly call `Refresh()` on the `DataGridView`. Here's a snippet of my implementation: ```csharp public partial class MainForm : Form { private BindingSource bindingSource = new BindingSource(); private List<MyCustomObject> myDataList = new List<MyCustomObject>(); public MainForm() { InitializeComponent(); InitializeDataGridView(); } private void InitializeDataGridView() { bindingSource.DataSource = myDataList; dataGridView1.DataSource = bindingSource; } private void UpdateData() { myDataList.Add(new MyCustomObject { Name = "New Item", Value = 10 }); bindingSource.DataSource = null; // Clear the BindingSource bindingSource.DataSource = myDataList; // Reassign the updated list // dataGridView1.Refresh(); // This works but feels unnecessary } } ``` I noticed that calling `bindingSource.ResetBindings(false);` doesnβt seem to work in this case, and the `DataGridView` remains blank until I force a refresh. I would prefer to avoid manual refresh calls and ensure the `DataGridView` updates automatically when the underlying data changes. Is there a recommended way to handle this scenario? Am I missing something in terms of best practices for data binding in WinForms? My team is using Csharp for this microservice. Could this be a known issue? I recently upgraded to Csharp 3.9. I'd really appreciate any guidance on this.