C
Craig Buchanan
I am using a ListView with checkboxes as a metaphor for working with a
collection (MapiFolder.Items) of ContactItems in a Wizard that I am
building--I want to make sure that I'm using 'best practices' when 'binding'
the two objects together.
I use a form-level property to store the collection of ContactItems which
have been filtered according to a user's input. I manually bind selected
properties of (i.e. create ListViewItem and SubItems) this collection to the
ListView, as there isn't a way to do this declaratively. I use the EntryId
as the Tag for the ListViewItem.
Currently, if I need to make change to a ContactItem that has been created
in the ListView (e.g. changing the email address), I use the EntryID to
locate the ContactItem in the MailFolder.Items collection using the Find
method.
It appears that the Index to the MapiFolder.Items collection is the
MailItem's (ContactItem) Subject property. I would use this, but I'm a bit
concerned that two ContactItems have the same Subject (I live in MN and
there are a lot of Andersons...).
Is there a better pattern to use?
Thanks for your time,
Craig Buchanan
collection (MapiFolder.Items) of ContactItems in a Wizard that I am
building--I want to make sure that I'm using 'best practices' when 'binding'
the two objects together.
I use a form-level property to store the collection of ContactItems which
have been filtered according to a user's input. I manually bind selected
properties of (i.e. create ListViewItem and SubItems) this collection to the
ListView, as there isn't a way to do this declaratively. I use the EntryId
as the Tag for the ListViewItem.
Currently, if I need to make change to a ContactItem that has been created
in the ListView (e.g. changing the email address), I use the EntryID to
locate the ContactItem in the MailFolder.Items collection using the Find
method.
It appears that the Index to the MapiFolder.Items collection is the
MailItem's (ContactItem) Subject property. I would use this, but I'm a bit
concerned that two ContactItems have the same Subject (I live in MN and
there are a lot of Andersons...).
Is there a better pattern to use?
Thanks for your time,
Craig Buchanan