Home > Net >  In c # on DataGridView refresh, select the refresh before the selected value
In c # on DataGridView refresh, select the refresh before the selected value

Time:10-10

Now have a refresh, but after the refresh automatically jump back to the first line, hope to get good effect is refreshed after selected to refresh before the line,

CodePudding user response:

Save the selected data (such as a number), after the reload, data binding event, find the corresponding data,

CodePudding user response:

When the selected you can get to the line of the index, with a variable record this value preserved, refresh later made comparison according to the index or other marks selected

CodePudding user response:

Refresh the record before the selected rows continue to selected after refresh

CodePudding user response:

reference 1st floor Imaor response:
save the selected data (such as a number), after the reload, data binding event, find the corresponding data,

Could you tell me specific code is how to operate,

CodePudding user response:

Can not in operating DataSouce attribute,
Direct manipulation Rows attribute, such interface won't refresh

CodePudding user response:

reference 5 floor wang_peng_yl reply:
can not operating DataSouce attribute,
Directly manipulate Rows attribute, so interface will not have full refresh

What's operating Rows attribute?

CodePudding user response:

refer to 6th floor lh273755505 response:
Quote: refer to the fifth floor wang_peng_yl reply:

Can not in operating DataSouce attribute,
Directly manipulate Rows attribute, so interface will not have full refresh

What's operating Rows attribute?


Rows is a collection, it can be the operation, the Add and Remove
Because even if use DataSouce, and eventually into Rows to draw

CodePudding user response:

Can you tell me the problem is how to solve?
  •  Tags:  
  • C #
  • Related