The filter control is a very nice addition to the XtraEditors library. However, I feel that it is limited in its usage due to the fact that you are only able to select properties that exist at the parent level. For example, if you have a 'Contact' object that has an 'Address' object which has properties like City, State and Zip Code, you can't filter a group of contacts based on a particular city or state becuase these are not exposed at this level. You could obviously create properties on the Contact object that simply refer to the Address.City etc. but this is merely a workaround. Neither does this solution work for collections of objects, for example maybe each Contact has a collection of Addresses.
I have been able to successfully modify the source code (not something easy but not something very hard either, especially for DevExpress) which gives me this capability with XPCollections. But I believe this should definately be something that is built into the control and would greatly improve its capabilites. Attached are some screen shots of what I have been able to accomplish. On the picture with the FilterControl, every column that has a "." (period) in it is accessing another objects properties. The picture with the drop down menu is using an XtraBars.PopupMenu (to get the 'LookAndFeel', however something that has a max size and scrollbars would be nice… I think that there is already a suggestion for this.)
Proposed Solution:
The filter editor should have the following capabilites:
- Able to filter any child objects whether a single object or a collection of objects and be able to do this to any level.
- Collections should be able to be filtered by count (equals, does not equal, greater than, less than, etc.)
- Collections should be able to be filtered by object type (if the collection is of a base type) (equals, does not equal)
- You should be able to up-cast a collection of objects to a derived type so that you can delve into the heirarchy of the derived type.
Attached new document. The document explains additional capabilities and shows screenshots of how it is accomplished.
See Also:
http://community.devexpress.com/forums/p/91982/317212.aspx#317212
http://community.devexpress.com/forums/p/77543/299703.aspx#299703
http://community.devexpress.com/forums/t/95513.aspx
We are planning to enhance the FilterControl in future versions of our libraries, by introducing features demonstrated in the XAF - Filter Editor Improvements in List Views (coming in v2011 vol1) blog. Please let us know your thoughts in comments to this blog.
See Also:
ASPxFilterControl - show properties list in a tree to provide a capability to use properties of the referenced objects in criteria
Thanks,
Dennis