Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Problem with maxcount and filter on newslist

Vote:
 
We have a newslist that we want to sort using our own algorithm and we also want to set a maxcount on the list. It seems like the maxcount is applied to the list before the sorting. We want to first sort the list and then show the first number (maxcount) of news. Can anyone see what we are doing wrong? We have the datasource of the newslist as a property that we fill in the method AddPages. protected void Page_Load(object sender, EventArgs e) { AddPages(); // Add custom sorting NewsList1.SortBy = null; NewsList1.Filter += new EPiServer.Web.WebControls.FilterEventHandler(Utils.SortPages); NewsList1.DataBind(); }
#13233
Oct 15, 2007 16:12
Vote:
 
Perhaps you could try to sort the PageDataCollection before binding it to the NewsList? /Christoffer
#15542
Oct 25, 2007 22:43
* 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.