Datagridview refresh contents
hello, i have a datagridview and i add edit and delete it's values... and after every change i do
Code:
this.myTableAdapter.Fill(this.myDataSet.my);
this updates my datagrid successfully but if i had a row selected before update in the datagridview after the update no row is selected... but i don't want to lose my selection..
Re: Datagridview refresh contents
Save the selected row (or index) before filling it and then set it again afterward.
Re: Datagridview refresh contents
i thought about it but it doesn't help me... because i want to scroll up and down and if the update occurs during my scroll i will go to the top....
Re: Datagridview refresh contents
Don't fill the the tableadapter after every update, Just acceptchanges the dataset.
Re: Datagridview refresh contents