Home All Groups Group Topic Archive Search About

How do i bind to a collection

Author
7 Mar 2006 9:55 PM
Vivek M
I know how to bind to a property in a class like this :

this.BindingContext.Add(Class1.PropertyName, dataview, "Name");



Now i have a data Relation which can return muliple rows. Here is the construct

CurrencyManager cm = (CurrencyManager)this.BindingContext[dataview, "StudentsWithLastNameX"];

while( cm.Position < cm.Count)
{
    this.BindingContext.Add(Class1.Stutdents, dataview, "FirstName");   <-------- I want to add binding to FirstName with a collection instead of property.
    cm.Position ++;
}


Can anyone suggest how do go about doing this?

Thanks
Vivek

AddThis Social Bookmark Button