BindingSource CurrentChanged/PositionChanged old item
Is there a way to get a notification before Current
of a BindingSource
changes in Windows Forms, including the old item?
I'd like to save the old element before navigating away. CurrentChanged
and PositionChanges
both are EventHa开发者_高级运维ndler
events and do not provide a reference to the old item.
It is not that important to get notified before the position changes, but it is critical to get the old item.
Cheers Matthias
store it yourself ...
everytime Current
changes you are notified by the event...
if you have a reference that is updated at the end of your eventhandler (store reference to current item) you can look at this reference when the event handler runs again ... when you look at it before it is updated, it will refer to the old item
精彩评论