views:

67

answers:

1

I have this strange problem all day now. I dunno if you handled something similar. I used two different serializers and now i know its not this problem.

Im sending some data over TCP Sockets. Serialize -> Send -> Deserialize, everything works ok, i can get my objects search through them, use they're properties! But, if e.g receive a BusinessObject[] and convert into List<BusinessObject>, then bind the list in a Control.DataSource = businessObjectList; BOOM! NotSupportedException.

Tried it with 3 different controls. Same behaviour. My head is empty of ideas right now!! The Send TCP happens on Desktop Framework, Receive on Compact Framework. But i dont think this has to do with anything.

I wish for an explanation on this!

A: 

Re cross-thread error... simply don't try binding from the wrong thread! You'll have to switch back to the main thread for UI updates, sorry. As it happens I have used a cross-thread safe list in the past (for whatever meaning "safe" has when multiple threads are mutating the same list... it raises notification events on the UI thread, I mean) - but it certainly won't work on CF.

Marc Gravell
Thanx anyway Marc :) I think i will stay with Control.InvokeRequired, would be great to handle the data before i pass them out of the Data Library, but i saw too the effect of not working the solution i found!