Hi,
Suppose I have two columns A and B, if my column A is filtered with certain data, then i would like to filter on column B. But the column B's filter popup will show all the items (before A is filtered). How can i show only the filtered items (by A) in the column B's filter popup?
Thanks before hand,
Longchrea NEAK
Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.
Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.
Hello,
We have a special sample that illustrates how to accomplish this task. Please review the following help topic: How to: Create a Custom Filter Dropdown. Let me know if you need further asssitance.
Thank you, Marina
Hello Marina,
Thanks so much for the answer. When I set the FilterPopUpMode to "List", it works! In other words, the popup shows only the visible items (after A is filtered) in List mode. However, we need a Checklist FilterPopUpMode in our project, will this feature will be implemented later in the next release?
Best,
Longchrea NEAK
Hello,
Sorry, but this behavior is by design and we don't plan to change it in the future. However, if you want, you can use a workaround to solve this task. Please see the following code:
void MyTableView_ShowFilterPopup(object sender, FilterPopupEventArgs e) { List<object> list = new List<object>(); object[] objs = myTableView.GetUniqueColumnValues(e.Column, false); foreach(CustomComboBoxItem item in e.ComboBoxEdit.ItemsSource) if(objs.Contains(item.EditValue)) list.Add(item); e.ComboBoxEdit.ItemsSource = list; } ... public class MyTableView : TableView { public object[] GetUniqueColumnValues(GridColumn column, bool includeFilteredOut) { return DataProvider.GetUniqueColumnValues(column, includeFilteredOut, true); } } ...
Hope this helps.
Best regards, Alan.
R&D, .NET Team.
Thanks so much Alan for the confirmation and the code, i found it is so useful ;)
Best,
Longchrea NEAK
Hello,
I'm glad to be of help! Please feel free to contact us in case of any difficulty - we'll be happy to help you.
Best regards, Alan.
R&D, .NET Team.