Current filter:
                                You should refresh the page.
                                  • I can use the [ListViewFilter] text below to specify filter(s) at the class definition level.   This works great.
                                    [ListViewFilter("Due within 14", "[RequestDate] >= ADDDAYS(LocalDateTimeThisWeek(), -14)")]

                                    How can I do the same thing for a collection within the class?    I can easily do it in the model editor (Itemmast_OrderReleases_Listview), but would like to specify it in the class definition instead.   Is there a way to do this?

                                    The below code is invalid.

                                    [ListViewFilter("Due within 14", "[RequestDate] >= ADDDAYS(LocalDateTimeThisWeek(), -14)")]
                                    public XPCollection<OrderRelease> OrderReleases
                                      get { return GetCollection<OrderRelease>(nameof(OrderReleases)); }

                                1 Solution

                                Creation Date Importance Sort by


                                Although XAF doesn't create filter items for nested collections based on the ListViewFilter attribute, you can create such items manually in a custom controller. The following APIs should help you with this task:

                                Frame.GetController() method ;
                                FilterController.SetFilterActionRefreshed event ;
                                E3977 - How to access a nested ListView from the parent DetailView's controller and vice versa ;
                                Types Info Subsystem ;

                                Alternatively you can add required items using the Customize the Application Model via the Nodes Generator Class approach.

                                Try these approaches and let me know your results.


                                • Customer82561 10.21.2019

                                  Thanks Andrey, I will review those topics.