Try our conversational search powered by Generative AI!

Multipel sortering av PageDataCollection

Vote:
 
Hej Jag vill sortera en PageDataCollection, sorteringen skall göras så att den grupperar på en property och inuti den grupperingen skall den sortera på hur categorierna är satta på sidan. Önskat resultat Monthly (Property) --Shop (Kategori satt på sidan) ---SIDA1 (Sidans namn) ---SIDA2 --Buy ---SIDA5 ---SiDA6 Weekly --Shop ---SIDA3 ---SIDA4 Idag använder jag en sortering av typen EPiServer.Filters.FilterPropertySort SortPeriod = new EPiServer.Filters.FilterPropertySort("Period",EPiServer.Filters.FilterSortDirection.Ascending); Men har problem med att applicera ytterligare ett filter på sorteringen, då överrider den det första filtret. Idag använder jag en asp:repeater där jag sätter DataSource till en PageDataCollection. Är detta rätt, eller borde jag använda en EpiServer:PageList istället? Hmm många frågor, men är det någon som gjort något liknande? /henrik
#12281
May 19, 2005 10:37
Vote:
 
I would guess that the easiest thing here is to make a custom filter that sort the pages considering several properties. There should be information about how to do this in the sdk and the faq section (www.episerver.com/faq). I don't think it would make much difference using a pagelist compared to a repeater but I don't think you can add a filter to a repeater so I would go for a PageList.
#13966
Jun 09, 2005 17:37
Vote:
 
We have done this using our own special sort control. Works great! Even better is to subclass PageList into your own list control that can then have support built in for more than one sort order. We created SortBy2 in extenstion to the normal SortBy property.
#13967
Jun 10, 2005 11:12
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.