Current filter:
                                You should refresh the page.
                                  • Hi,
                                    I use filter control with two buttons to filter content with different filters.

                                    When I click on the first button, the contents of the list must be filtered with the code whose value is equal to E1
                                    When I click on the second button, the contents of the list must be filtered with the code whose value is equal to E12

                                    The problem is that when I click on the first button, the contents of the list display all the code (E1 and E2) rather than only E1. I have to click twice on the first button to only have E1 in the list

                                    There is another problem when I click on the second button and thereafter on the first button, the contents of the list shows E2 rather than E1.

                                    I made a sample to reproduce my probleme.

                                    Thanks for your help.
                                    Jimmy

                                1 Solution

                                Creation Date Importance Sort by

                                Hello,
                                Thank you for the sample. Let me explain why this behavior occurs.
                                The ActionButtonIndex property is set to 0. As a result, when you click the first button, the popup window is opened. After that the ButtonClick event is raised. Since you set the currentButtonTag value in the ButtonClick event, I suggest setting the ActiveFilterString property in this event handler as well.
                                I have recorded a video and attached the modified sample to illustrate this approach.
                                Please try it and let me know if this solution suits you.

                                Show all comments
                                • Jimmy Beaudoin 10.21.2019

                                  Hello,
                                  I implemented your solution and it works as I expected, except that the EditValueChange event is fired when the user clicks on the second filter and clicks it again to close the list. The event is also fired if the user clicks on the first button and click also on the second one while  the first list is opened. In my case, I only want the event to be triggered if the user selects a particular item in one of the lists.

                                  [C#]
                                  private void searchLookUpEdit1_EditValueChanged(object sender, EventArgs e) { if (searchLookUpEdit1.EditValue != null) { string firstname = searchLookUpEdit1.EditValue.ToString(); } }

                                  Thanks for your help.

                                • Jimmy Beaudoin 10.21.2019

                                  This looks like a mouse over problem ... if the user moves the mouse to a specific item and moves the mouse out of the list and clicks on a button, the EditValueChange event is fired and the EditValue is the one of the last element that the mouse flew over.

                                • Dmitry Tor (DevExpress Support) 10.22.2019

                                  Hi Jimmy,
                                  I see this behavior.
                                  Now, I need additional time to research this task. I will update this ticket once I have any results. Please bear with us.

                                • Dmitry Tor (DevExpress Support) 10.23.2019

                                  Hello,
                                  Thank you for your patience. To achieve this result, I suggest moving your logic to the ButtonPressed event handler. As an alternative solution you can create UserControl with SearchLookUpEdit and buttons to switch the current filter.
                                  I have attached the modified sample to illustrate these approaches.
                                  I hope you will find it useful.

                                • Jimmy Beaudoin 10.26.2019

                                  Hello,
                                  As you suggest, I used the ButtonPressd event handler, but there was still 2 problems that I solved. The first problem was when the user clicked in the control text zone rather than one of buttons, the list was not filtered. The second problem was when we clicked on the first button (index 0) the first time, the list was not filtered to.

                                  To resolve the problem:

                                  1. I add a call to SetFilter method in the Popup event.

                                  2. I also set the currentButtonTag to the default value in CloseUp event to handle problem when button 2 is pressed and after the user clic back on button 1 or in the control text zone.

                                  The alternative you suggest with the user control was also a good evolution.

                                  I have modified the sample and put it back to the comment.
                                  Thank for your help to resolve my problem .

                                • Dmitry Tor (DevExpress Support) 10.28.2019

                                  Hi,
                                  Thank you for informing us of your progress.
                                  As far as I understand, you found a way to achieve the desired result.
                                  Otherwise, feel free to reactivate this ticket.