Walaa wrote:
You should set the LivePersistence property to False.
And then handle the Perform_Select event to set the EntityCollection.
Thanks for the advise, I found the following in the documentation, (should have red that first ):
protected void orderDS_PerformSelect(object sender, PerformSelectEventArgs2 e)
{
// fetch all orders which are in the selected page using the filter passed in
// via the PerformSelectEventArgs2 object.
using(DataAccessAdapter adapter = new DataAccessAdapter())
{
adapter.FetchEntityCollection(e.ContainedCollection, e.Filter,
e.MaxNumberOfItemsToReturn, e.Sorter, e.PrefetchPath,
e.PageNumber, e.PageSize);
}
}
Problem, I assumed I could replace the innerbody of the method with a assigment using the session variable. However, on compile I get the following error:
Property or indexer 'SD.LLBLGen.Pro.ORMSupportClasses.PerformSelectEventArgs2.ContainedCollection' cannot be assigned to -- it is read only. When I use the following body in the PerformSelect method:
e.ContainedCollection =albumlist;
The albumlist is a private property that keeps a collection in the session state with the following signature:
private EntityCollection<PhotoAlbumEntity> albumlist