Try our conversational search powered by Generative AI!

Nested newslists

I have two newslist that are nested, one newslist in an other. ... .... I need to add a filter to List2 but where/how should I do that? The followinf dosn't work: private void InitializeComponent() { this.List2.Filter += new EPoServer.WebControls.FilterEventHandler(List2_Filter); } "Object reference not set to an instance of an object." /Stefan
Aug 29, 2006 10:04
You will get the "Object reference not set to an instance of an object." because the list2 exists inside another list (inside a template control and can not be accessed directly). If you want to filter this, you need to do a recursive FindControl (list1.FindControl("list2")) and then filter the control found. Another way to do this is to filter your datasource for list2. Have the pagereference as the parameter to the metod and make a codebehind method with a pagedatacollection with you add a filter on. ... .... For adding a filter to a pagedatacollection, see the FAQ in the support section on or take a look at this: FilterSort sort = new FilterSort(FilterSortOrder.Alphabetical); sort.Filter(null, new FilterEventArgs(col)); /Øyvind
Sep 12, 2006 13:03
* 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.