();
foreach (DirectoryEntry de in ent.Attributes[31].AvailableItemsList)
{
if (((ListDirectoryEntries)ent.Attributes[31]).Contains(de))
{
items.Add(new CloseLocations(de.Term, true));
}
else
{
items.Add(new CloseLocations(de.Term, false));
}
}
return items;
}
The CloseLocations type is a class with two public fields (Key and Value) that are filled by my method and then passed into the report as a list and the report will show the list in a table quite happily.
It all works fine, as long as you don't have to include the ListsTypes() on your reports.
Originally, the code to get the proper BindingSource running looked like this:
ViewObject MyData = new ViewObject(vid, HidePD);
this.ViewObjectBindingSource.DataSource = MyData;
this.comfortAndSecurityBindingSource.DataSource = MyData.ObjectComfortAndSecurity();
this.closeLocationsBindingSource.DataSource = MyData.ObjectCloseLocations();
this.propPhotoBindingSource.DataSource = MyData.PropertyImages();
reportViewer1.RefreshReport();
Now, when I pass List to my primary BindingSource, the other binding sources have to be List<> or List types.
I tried this:
List myData = new List();
... fill the list...
List> comfort = new List>();
foreach(ViewObject vo in mydata)
{
comfort.Add(vo.Comfort());
}
this.comfortAndSecurityBindingSource.DataSource = comfort();
the problem now is that the comfort List<> is not "bount" to it's parent object that shall be getting data from it. How can I fix this?
Has anyone dealed with this?