views:

37

answers:

1

I have an object with a simple property:

public class obj
{
    /* ... */
    public List<string> EMails { get; set; }
    /* ... */
}

All of the other properties on the object are simple strings or ints, and they databind well to textboxes/updowns and so forth, but I'm having trouble binding this List. The UI doesn't have any controls (and won't allow me to add any) in the Data Sources pane, and manually binding to a ListBox doesn't work because the "Items" property is readonly.

I've also tried adding a binding that is DataUpdateMode.Never because I don't intend on using the control to add items; I'll do that with another control, but I do want it to receive updates from the object automatically.

So what control can I do this with?

+2  A: 

Use BindingList<string>

Brett Veenstra
doh. Now I feel like an idiot... I even knew that :( At the very least, thanks for the reminder.
SnOrfus