Hi again, sorry for spamming the forum, this is just for the record
It seems that this method for custom paging and sorting works:
Use a LLBLGenProDataSource, set LivePersistance to false, EnablePaging to true. Implement the PerformSelect event handler to:
protected void llblDataSource_PerformSelect(object sender, SD.LLBLGen.Pro.ORMSupportClasses.PerformSelectEventArgs e)
{
BusinessLogicHandler handler = new BusinessLogicHandler();
SD.LLBLGen.Pro.ORMSupportClasses.LLBLGenProDataSource datasource = (SD.LLBLGen.Pro.ORMSupportClasses.LLBLGenProDataSource)sender;
datasource.DataContainerType = SD.LLBLGen.Pro.ORMSupportClasses.DataSourceDataContainerType.EntityCollection;
datasource.EntityCollection = handler.GetCollectionUsingGetMultiOrEvenGetMultiManyToMany(e.PageNumber, e.PageSize, e.Sorter)
datasource.DataBind();
}
Implement PerformGetDbCount event handler
protected void llblDataSource_PerformGetDbCount(object sender, SD.LLBLGen.Pro.ORMSupportClasses.PerformGetDbCountEventArgs e)
{
BusinessLogicHandler handler = new BusinessLogicHandler();
e.DbCount = handler.GetNumberOfObjectsInTheCollectionWeAreListing()
}
Add a GridView, set its datasource to the LLBLGenProDataSource using the smart tag, set AllowSorting to true and AllowPaging to true.
In the GetCollection methods of the business logic object when using SomeCollectionViaSomeEntityToSomeOtherEntity property of an entity (this is the mapping of a m:n relation as i have understood it) i had to use GetMultiManyToMany on that property and send in the arguments for paging and sorting to that method
Hope any of this made sense, i've only looked at this LLBLGenPro stuff for a week so i'm still very confused
Regards