Updating of BindingSource in WinForms does not update Datasource Collection

前端 未结 4 788
广开言路
广开言路 2021-02-14 00:57

I want to display a custom collection in a DataGridView in a Windows Forms app. This custom collection implements ICollection, and IEnumerable

4条回答
  •  迷失自我
    2021-02-14 01:23

    I believe I ran into this issue a while ago - I did a find in files on my code and I think this is the solution that worked for me.

            // Applies pending changes to the underlying data source.
            this.bindingSource1.EndEdit();
    

    This was in the context of a click handler for the save button.

提交回复
热议问题