Groups | Blog | Home
all groups > dotnet compact framework > july 2007 >

dotnet compact framework : ListChanged event not fired when appointment collection updated


None
7/25/2007 4:02:41 PM
hi there,

i am developing a calendar application using c# and cf2 sp1, and i got
stuck when dealing with the ListChanged event of the
appointmentcollection. i have a datagrid to populate the appointment
items of the collection. the event is only fired when the collection
is updated by my own application, it does not when the collection is
updated by the wm5 calendar application, say adding or removing an
appointment.
what i want to achieve is whenever the collection is updated (item
added, changed or removed) by my application or the wm5 calendar, i
have a chance to adjust the size of the datagrid in order to show the
updated appointments.
now, the datagrid can only resize when the appointments are updated by
my own application. by looking at the collection.count, i am sure the
collection is updated by the wm5 calendar, but since the ListChanged
event is not fired, i got no chance to resize the datagrid for the
changes.
can anyone tell me how to get a chance to resize the datagrid when the
collection is updated by the wm5 calendar?

thanks
batterheadccw
None
7/25/2007 4:17:09 PM
[quoted text, click to view]

hi there,

does anyone know how can my application be notified about the changes
to the collection by other applications?

thanks
batterheadccw
Peter Foot [MVP]
7/25/2007 5:29:55 PM
This is due to the way the class is implemented in the Microsoft libraries.
It doesn't respond to events from POOM itself. I wrote an alternative
library which does support this :- http://inthehand.com/content/Mobile.aspx

Peter

--
Peter Foot
Microsoft Device Application Development MVP
www.peterfoot.net | www.inthehand.com
In The Hand Ltd - .NET Solutions for Mobility

[quoted text, click to view]
AddThis Social Bookmark Button