D
David C
I have a business object with two public properties - "OrganizationID" and
"OrganizationName". Pretty typical. We will call it Organization.
And I have a collection object which is an arraylist that stores a
collection of the business object described above. Let's call it
Organizations
I have a lstbox control. So I bind it Organizations to the listbox control.
lstSelectedOrgs.DataSource = null;
lstSelectedOrgs.ValueMember = "OrganizationID";
lstSelectedOrgs.DisplayMember = "OrganizationName";
lstSelectedOrgs.DataSource = Organizations;
I initially populate the control. Then I have a way to remove an item. And
then I bind it again.
At some point, all of a sudden, what shows up in the list box looks like
this.
MyNameSpace.Organization
"OrganizationName". Pretty typical. We will call it Organization.
And I have a collection object which is an arraylist that stores a
collection of the business object described above. Let's call it
Organizations
I have a lstbox control. So I bind it Organizations to the listbox control.
lstSelectedOrgs.DataSource = null;
lstSelectedOrgs.ValueMember = "OrganizationID";
lstSelectedOrgs.DisplayMember = "OrganizationName";
lstSelectedOrgs.DataSource = Organizations;
I initially populate the control. Then I have a way to remove an item. And
then I bind it again.
At some point, all of a sudden, what shows up in the list box looks like
this.
MyNameSpace.Organization