Declined
Last Updated: 25 Jul 2019 12:30 by ADMIN
CHEE HANG
Created on: 26 Mar 2019 12:08
Category: UI for WinForms
Type: Bug Report
0
RadMultiColumnComboBox: incorrect selection when showing a RadMessageBox in the SelectedIndexChanged event

You can use the following code snippet and follow the steps from the provided gif file:

        public RadForm1()
        {
            InitializeComponent();

            DataTable dt = new DataTable();
            dt.Columns.Add("Id");
            for (int i = 0; i < 100; i++)
            {
                dt.Rows.Add(i);
            }

            this.radMultiColumnComboBox1.DisplayMember = "Id";
            this.radMultiColumnComboBox1.ValueMember = "Id";
            this.radMultiColumnComboBox1.DataSource = dt;
            this.radMultiColumnComboBox1.SelectedIndex = -1;

            this.radMultiColumnComboBox1.SelectedIndexChanged += radMultiColumnComboBox1_SelectedIndexChanged;
        }

        private void radMultiColumnComboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            RadMessageBox.Show("You just selected index " + this.radMultiColumnComboBox1.SelectedIndex);
        }

2 comments
ADMIN
Dimitar
Posted on: 25 Jul 2019 12:30
Hello,

The event is fired when changing the current row in the grid. At this point, one does not know if the popup should be closed since the current row can be changed by the keyboard as well.

If you want to show a message box in this event, you should close the popup before doing so:
private void radMultiColumnComboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
    if (this.radMultiColumnComboBox1.MultiColumnComboBoxElement.IsPopupOpen)
    {
        this.radMultiColumnComboBox1.MultiColumnComboBoxElement.ClosePopup();
    }
    RadMessageBox.Show("You just selected index " + this.radMultiColumnComboBox1.SelectedIndex);
}


Regards,
Dimitar
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
ADMIN
Dess | Tech Support Engineer, Sr.
Posted on: 26 Mar 2019 12:14
Hello, CHEE HANG,  

Thank you for reporting this. I confirm that this behavior is not correct.

I have also updated your Telerik points.

Currently, the possible solution that I can suggest is to show the message in the DropDownClosed event: 

private void radMultiColumnComboBox1_DropDownClosed(object sender, Telerik.WinControls.UI.RadPopupClosedEventArgs args)
{
   RadMessageBox.Show("You just selected index " + this.radMultiColumnComboBox1.SelectedIndex);
}

I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.