optimize updates to DataTable bound to DataGridView

后端 未结 7 1208
执念已碎
执念已碎 2021-02-14 19:27

I have a Form in my application that displays some data. When I first show the Form, I load some data into a DataTable then bind the DataTable to a DataGridView. I also start an

7条回答
  •  情书的邮戳
    2021-02-14 20:02

    I found that using resetBindings seems to move the scrollbar and the user is left thinking what did i do? I found that using a bindingList as a datasource, with an object that uses INotifyPropertyChanged, and then when I edited the row, (bound to an object). the row wasnt being updated until a click or selection change on the form.

    but calling dgv.Refresh() seemed to solve the problem, without the scroll change.

提交回复
热议问题