Yeah, some goofiness in SubSonic is keepng it from working as expected.
So, to get this to work, you have to do a couple of things:
1.) Add in a ProductCollection
2.) set the productCollection to the the results of the query
3.) THEN, use the Sort method
3.) THEN, bind it to the pagedDataSource
So, my code looks like this:
ProductCollection productCollection = null;
if (manufacturerId > 0) {
productCollection = Store.Caching.ProductCache.GetProductsByCategoryIdManufacture(categoryId, manufacturerId);
}
else if (priceStart >= 0 && priceEnd > 0) {
productCollection = Store.Caching.ProductCache.GetProductsByCategoryIdPriceRange(categoryId, priceStart, priceEnd);
}
else {
productCollection = Store.Caching.ProductCache.GetProductsByCategoryId(categoryId);
}
productCollection.Sort(Product.Columns.Name, true);
pagedDataSource.DataSource = productCollection;
--
Support dashCommerce -
Buy Our Stuff!!Find a bug? Create a
Work Item for a fast response.. Want to help?
Create a patch for us! Documentation? Help us
write some!