Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
280
Async Row Update Fail
posted

Hi,

when I try to update database with an async before row update event e.Row cannot be used (IsAddrow, DataChanged and e.Cancel not working)

how can i handle async update without losing link of e.Row param.

Parents
No Data
Reply
  • 469350
    Offline posted

    If you are trying to use DataBinding (and the WinGrid must be bound to data) and mutlitple threads at the same time, then that's just never going to work. If you are trying to use multiple threads, then you have to be in control of the communication between the threads. But when using DataBinding, the DotNet BindingManager handles the communication between the control (the grid) and the data source, and so there's no way to properly martial the data. So you simply cannot do that safely. 

    The only conceivable way this could possible work is if you bound the grid to some local data source object on the UI Thread. And then added some kind of extra layer that communicates between that local data source and some other thread. That way, you would be completely in control of that communication. But it is by no means trivial and you would have to handle marshalling all communication between the local data source and the background thread which would presumably communicate with some server where there the database resides. 

Children
No Data