Current filter:
                                You should refresh the page.

                                1 Solution

                                Creation Date Importance Sort by

                                Hi Noxe,
                                By default the CollectionSource's filter criteria are applied to root objects only. Child objects are obtained from the ITreeNode.Children member. This collection is not related to the original collection source and thus is not filtered.

                                Currently, you can use the following solutions to filter all nodes:

                                1. Use platform-dependent solutions for the WinForms TreeList and ASP.NET ASPxTreeList controls. To do this, implement a ViewController to access the TreeListEditor or ASPxTreeListEditor objects and customize underlying tree lists to find and focus the required nodes. See the How to search and focus nodes in the Tree List editor article for an XAF example for both Windows and the Web platforms.
                                2. Implement a fully custom List Editor based on a treelist control configured as you need and then use it for the required ListView.
                                Show all comments
                                • Sheldmandu 01.01.2014

                                  Is there any progress on this? I'm finding that I'm up against the same issue. Would it not be possible to retrieve a flat list using the criteria and then convert it into a tree hierarchy? I'm doing this in another application and it works great, it's much better than running lots of queries for all the child nodes.

                                • Dennis (DevExpress Support) 01.03.2014

                                  @Nick: Thanks for your feedback. We do not have any news on this for now. It is possible, however, to implement a custom List Editor based on a treelist control configured as you need and then use it for the required ListView. Please refer to the help article for more details.

                                • Apostolis Bekiaris (DevExpress) 01.12.2014

                                  Thanks to Sheldmandue expandframework v13.2.6.3 that may use the following wired-up attributes

                                • Andrew Bingham 2 04.12.2014

                                  Hi Dennis
                                  What is the progress on this ?
                                  Where is this limitation documented?
                                  I have a property in a BO -whose LookupLIstView uses a Win.TreeListEditor.
                                  I want to filter the lookup like this: [DataSourceCriteria("IsExactType(This, MySolution.Module.SaleStructure.Customer')")]
                                  How can I best achieve this?

                                • Dennis (DevExpress Support) 04.14.2014

                                  @Andrew: This request is not yet implemented.
                                  I have updated our original answer to this ticket to better describe possible options.
                                  As I see, it was already documented: Documentation - Describe filtering and searching specifics for Tree List Editors.
                                  I have asked our tech writers to find a better place for this note in our docs, so that it is easily discoverable by users. Thanks for your input in this regard.

                                • Andrew Bingham 2 04.21.2014

                                  Thanks Dennis
                                  The problem is that I have Data which represent a Heterogenous Tree structure
                                  Put simply
                                  * there is a Customer Hierarchy
                                  * each Customer Node can optionally have Project Nodes,
                                  * A Customer node or a Project Node can have Estimates, Quotes or Sale Orders nodes
                                                    * These are also hierarchical - Estimate is parent of Quote, Quote is parent of Sale Order
                                  No problem in a List View!
                                  However if I want a Lookup List View for, say, CH + Project only - this does not work for a Tree View Editor
                                   private CriteriaOperator CustomerStructureFilter
                                                  //RELEASE1 Parent can only be a Customer or Project.
                                                  CriteriaOperator result = (
                                                          ( CriteriaOperator.Parse("IsExactType(This, ?)", typeof(Customer).FullName) |
                                                          CriteriaOperator.Parse("IsExactType(This, ?)", typeof(Project).FullName) ) &
                                                          CriteriaOperator.Parse("Not Contacts[This='@This']")
                                                  return result;

                                • Dennis (DevExpress Support) 04.22.2014

                                  Andrew, thank you for the additional information. I understand your scenario and the functionality you want to achieve. This is not currently possible with the built-in TreeListEditor and I suggest you implement alternative solutions for this particular case. For instance, you can implement a custom ListEditor with a desired functionality and use it for this particular lookup ListView via the EditorType property in the Application Model.

                                • Andrew Bingham 2 07.14.2014

                                  Hi Dennis
                                  In the documentation
                                  it states "Data  Obsolete. Gets or sets a value that can be freely used as your specific programming needs dictate "
                                  However when I Debugin VS I can see that the Data property exists and contains the right VAalue
                                  I rely on the Data property to determine the type of the object the TreeListNode represents.
                                  Is the Data property "obsolete"?

                                • Vlad G (DevExpress) 07.14.2014

                                  Hi, Andrew! The TreeListNode.Data article informs that this property is changed to the TreeListNode.Tag Property. Obsolete methods and properties will work, but the use of them is highly not recommended. They are not yet deleted only for backward compatibility with the code, created for elder versions. You should avoid using obsolete things in your new code if it is possible.

                                • Mario Blatarić 12.25.2015

                                  Any progress on this one?
                                  I am, again, having some issues filtering treelist, so I've been wondering when I can ditch all the extra code that handles these.

                                • Dennis (DevExpress Support) 12.25.2015

                                  Hello Mario,

                                  So far we have not had updates to these two solutions that were already described above.

                                  >>when I can ditch all the extra code that handles these.
                                  Would you please clarify which problems you are currently experiencing with your current solutions?
                                  How costly are your current solutions in terms of time and maintenance resources?
                                  How often do you experience these filtering requirements in your application (once in one ListView, every month or week in various ListViews)?
                                  Also, please describe precise scenarios for each case in your application so we are sure we are talking about the same thing and can better prioritize them. Thanks in advance!