Unplanned
Last Updated: 30 Mar 2016 09:32 by ADMIN
ADMIN
Dess | Tech Support Engineer, Principal
Created on: 05 Mar 2015 11:34
Category: MultiColumnCombo
Type: Bug Report
0
FIX. RadMultiColumnComboBox - the dropdown should not be closed when clicking the Excel-like filter popup in the grid
To reproduce:

private void Form1_Load(object sender, EventArgs e)
        {
            this.categoriesTableAdapter.Fill(this.nwindDataSet.Categories);

            this.radMultiColumnComboBox1.DataSource = this.categoriesBindingSource;
            this.radMultiColumnComboBox1.DisplayMember = "CategoryName";
            this.radMultiColumnComboBox1.ValueMember = "CategoryID";

            this.radMultiColumnComboBox1.EditorControl.EnableFiltering = true;
            this.radMultiColumnComboBox1.EditorControl.ShowHeaderCellButtons = true;
        }

Workaround:

 public Form1()
 {
     InitializeComponent();
     this.radMultiColumnComboBox1.MultiColumnComboBoxElement.PopupClosing += MultiColumnComboBoxElement_PopupClosing;
     this.radMultiColumnComboBox1.EditorControl.FilterPopupInitialized += EditorControl_FilterPopupInitialized;
 }

 private void EditorControl_FilterPopupInitialized(object sender, FilterPopupInitializedEventArgs e)
 {
     RadListFilterPopup filterPopup = e.FilterPopup as RadListFilterPopup;
     if (filterPopup != null)
     {
         filterPopup.PopupOpened -= filterPopup_PopupOpened;
         filterPopup.PopupOpened += filterPopup_PopupOpened;
         filterPopup.PopupClosed -= filterPopup_PopupClosed;
         filterPopup.PopupClosed += filterPopup_PopupClosed;
     }
 }

 bool shouldCancel = false;

 private void filterPopup_PopupClosed(object sender, RadPopupClosedEventArgs args)
 {
     shouldCancel = false;
 }

 private void filterPopup_PopupOpened(object sender, EventArgs args)
 {
     shouldCancel = true;
 }

 private void MultiColumnComboBoxElement_PopupClosing(object sender, RadPopupClosingEventArgs args)
 {
     args.Cancel = shouldCancel;
 }
Attached Files:
0 comments