|
-
November 4th, 2009, 10:29 AM
#1
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..
-
November 4th, 2009, 12:51 PM
#2
Re: Datagridview refresh contents
Save the selected row (or index) before filling it and then set it again afterward.
-
November 4th, 2009, 01:19 PM
#3
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....
-
November 4th, 2009, 08:25 PM
#4
Re: Datagridview refresh contents
Don't fill the the tableadapter after every update, Just acceptchanges the dataset.
-
November 5th, 2009, 07:45 AM
#5
Re: Datagridview refresh contents
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|