I tested it in VS 2005.
The following piece of code works just fine.
Provided that in the LLBLGenProDataSource EnablePaging="False"
protected void LLBLGenProDataSource1_PerformGetDbCount(object sender, SD.LLBLGen.Pro.ORMSupportClasses.PerformGetDbCountEventArgs e)
{
//e.DbCount = e.ContainedCollection.GetDbCount();
}
protected void LLBLGenProDataSource1_PerformSelect(object sender, SD.LLBLGen.Pro.ORMSupportClasses.PerformSelectEventArgs e)
{
CustomerOrdersTypedList myTypedList = new CustomerOrdersTypedList();
IRelationCollection relations = myTypedList.BuildRelationSet();
relations.Add(OrdersEntity.Relations.OrderDetailsEntityUsingOrderId);
PredicateExpression filter = new PredicateExpression();
filter.Add(OrderDetailsFields.UnitPrice > 100);
TypedListDAO dao = new TypedListDAO();
dao.GetMultiAsDataTable(myTypedList.BuildResultset(), (DataTable)e.ContainedTypedList, 0, null, filter, relations, true, null, null, 0, 0);
}
**Now if you want to enable paging in the dataSource you should appropriatly set the e.DbCount in the PerformGetDbCount event.
And appropriatly set the last 2 parameters of the GetMultiAsDataTable method to specify the page size and page number**