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

Re: help! how to add custom property to poom contact / appointment / task by Peter

Peter
Tue Nov 13 00:45:23 PST 2007

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

"None" <batterheadccw@gmail.com> wrote in message
news:1194937679.332366.169970@e9g2000prf.googlegroups.com...
> 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
>