First off; thanks for all your support in these forums!
I am using a LLBLGenProDataSource control with my gridview (paging enabled, self service). I have set live persistence to false.
Is there a better way of getting the filtered record count?
This is what I'm using, but just don't like the fact that it requires 2 trips to the database.
protected void OrderDataSource_PerformSelect(object sender, PerformSelectEventArgs e)
{
OrderDataSource.EntityCollection = Order.GetOrderHistory(SessionHelper.UserKey, e.PageNumber, e.PageSize);
}
protected void OrderDataSource_PerformGetDbCount(object sender, PerformGetDbCountEventArgs e)
{
e.DbCount = e.ContainedCollection.GetDbCount(e.Filter);
}
Any suggestions?
Thanks,
Nathan