Why do I need to change the Binding Source Position before I can SaveChanges

前端 未结 1 445
一个人的身影
一个人的身影 2021-01-18 03:11

I have a small demo WinForms app. One of the Forms is my Add New Person form. I used the Details View instead of the DataGridView from my Data Sources. When I e

1条回答
  •  被撕碎了的回忆
    2021-01-18 03:25

    You don't need to change the position, in fact you need to call BindingSource.EndEdit that applies pending changes to the underlying data source.

    Changing the position causes the underlying currency manager calls EndCurrentEdit and this is what the EndEdit method of binding source does for you.

    0 讨论(0)
提交回复
热议问题