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

dotnet compact framework : help! how to add custom property to poom contact / appointment / task


None
11/13/2007 7:07:59 AM
hi there,

i'm using vs2005 c# with .net cf 2.0 and developing an app for windows
mobile. i am at a point that i have to add a custom property to the
contacts in a contact collection for storing some extra information
about the contacts. however the app always returns "null" for whatever
i've updated to the new field. i've successfully added a field
"Checked" to a contact and the Add method returned true. then i tried
to update the value of Checked with "Yes" but it had no effect.

i want to update Checked so that i can make use of it. can somebody
help?

for (int iIdx = 0; iIdx < ccContactColn.Count; iIdx++)
{
ccContactColn[iIdx].Properties.Add("Checked");
ccContactColn[iIdx].Properties["Checked"] = "Yes"; //
ccContactColn[iIdx].Properties["Checked"] keeps returning null
}

remarks:
ccContactColn.IsReadOnly returns false
ccContactColn.IsFixedSize returns false


thanks
batterhead
Peter Foot [MVP]
11/13/2007 8:45:23 AM
You have to call ccContactColn.Update() to save changes you make to the
Contact.

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