MultiColumnComboBox with ScrollOnMouseWheel skips every second entry

1 Answer 71 Views
MultiColumn ComboBox
Julian
Top achievements
Rank 1
Iron
Iron
Julian asked on 16 Mar 2023, 11:27 AM

Hi,

I have a MultiColumnComboBox with the activated ScrollOnMouseWheel function which make the mouse wheel scroll through the entries when the dropdown is closed, that is what I want.

But by scrolling this way every second item is skipped, and therefore half of the entires cannot be reached.

Is there a way to change that behaviour?

 

Thanks

Julian

1 Answer, 1 is accepted

Sort by
1
Dess | Tech Support Engineer, Principal
Telerik team
answered on 20 Mar 2023, 11:41 AM

Hi,Julian,

Following the provided information, I prepared a sample project using the following code snippet:

        

public RadForm1() { InitializeComponent(); DataTable dt = new DataTable(); dt.Columns.Add("Id", typeof(int)); dt.Columns.Add("Name", typeof(string));

for (int i = 0; i < 20; i++) { dt.Rows.Add(i, "Item"+i); } this.radMultiColumnComboBox1.DisplayMember = "Name"; this.radMultiColumnComboBox1.ValueMember = "Id"; this.radMultiColumnComboBox1.DataSource = dt; this.radMultiColumnComboBox1.ScrollOnMouseWheel = true; this.radMultiColumnComboBox1.SelectedValueChanged+=radMultiColumnComboBox1_SelectedValueChanged; } private void radMultiColumnComboBox1_SelectedValueChanged(object sender, EventArgs e) { Console.WriteLine("Value: "+this.radMultiColumnComboBox1.SelectedValue); }

Indeed, scrolling with the mouse wheel jumps two items each time in RadMultiColumnComboBox:

I have logged it in our feedback portal by creating a public thread on your behalf. You can track its progress, subscribe for status changes and add your comments on the following link - feedback item.

I have also updated your Telerik points.

Currently, the possible solution that I can suggest is to disable the mouse wheel scrolling and manage the selected item programmatically: 

            this.radMultiColumnComboBox1.ScrollOnMouseWheel = false;
            this.radMultiColumnComboBox1.MultiColumnComboBoxElement.TextBoxElement.TextBoxItem.TextBoxControl.MouseWheel += TextBoxControl_MouseWheel;

        private void TextBoxControl_MouseWheel(object sender, MouseEventArgs e)
        {
            if (e.Delta > 0)
            {
                this.radMultiColumnComboBox1.EditorControl.GridNavigator.SelectPreviousRow(1);
            }
            else
            {
                this.radMultiColumnComboBox1.EditorControl.GridNavigator.SelectNextRow(1);
            }
        }

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

Regards,
Dess | Tech Support Engineer, Principal
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Julian
Top achievements
Rank 1
Iron
Iron
commented on 22 Mar 2023, 10:12 AM

Thank you, I will try your workaround!
Tags
MultiColumn ComboBox
Asked by
Julian
Top achievements
Rank 1
Iron
Iron
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or