This is a migrated thread and some comments may be shown as answers.

prevent text change

4 Answers 271 Views
MultiColumn ComboBox
This is a migrated thread and some comments may be shown as answers.
IT Development
Top achievements
Rank 1
IT Development asked on 25 Sep 2009, 09:21 AM

Hello ,

 

Simple question about the multicolumn combo box .

 

When browsing through the list of combo box items with arrow up and down I want to prevent the text in the of the combo box to change.

 

How can I realize this?

 

Kind regards,

 

Tim van Rooijen

4 Answers, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 28 Sep 2009, 03:30 PM
Hi Tim,

You can prevent the selected item from changing by applying a message filter to the application. I have demonstrated the approach in the sample project attached. In short, RadMultiColumnComboBox does not get the Key Down message when the pressed keys are Up or Down.

If you have additional questions, feel free to contact me.

Best wishes,
Nikolay
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
IT Development
Top achievements
Rank 1
answered on 29 Sep 2009, 08:53 AM

Hi Nikolay,

 

Thanks for youre reply.

 

The solution provided was not exactly what i was looking for.

 I want the user to be able to move through the list with arrow up and down. I just don’t want the text in the combobox to change with it.

 

I tried the following things:

Databinding the text propertie of the combo box to an item in my class that has the correct value. But setting these databinding doesn’t seems to have any effect.

 

Using the comboBoxRelatieZoeken_EditorControl_CurrentRowChanged event to restore the text to its previous value before moving through the list . This kind of works. But the combobox comboBoxRelatieZoeken_TextChanged event is fired multiple times now ( even though i remove the event handler, see sample ). I need that event for executing my query.

 

 

  private void comboBoxRelatieZoeken_EditorControl_CurrentRowChanged(object sender, CurrentRowChangedEventArgs e)

        {

            comboBoxRelatieZoeken.TextChanged -= new EventHandler(comboBoxRelatieZoeken_TextChanged);

            timerRelatieZoeken.Stop();

            comboBoxRelatieZoeken.Text = Zoektext;

            comboBoxRelatieZoeken.TextChanged += new EventHandler(comboBoxRelatieZoeken_TextChanged);

        }

 

The combobox shows a list of the first 10 items retrieved by a query. On every textchanged these items gets reloaded. The data required is to much to load add once. ( try to make something like an autocomplete textbox)

 

 

I you got any suggestion on how to prevent the text to change I’m very instrested.

 

Kind regards,

 

Tim van Rooijen

0
Nikolay
Telerik team
answered on 06 Oct 2009, 03:32 PM
Hello Tim,

Unfortunately, I cannot provide you with a solution where the TextChanged event will not be fired. All the changing events are fired when you move through the opened RadGridView rows and this behavior cannot be altered.

If you have additional questions, feel free to contact us.

Sincerely yours,
Nikolay
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Hadi
Top achievements
Rank 1
answered on 30 Jul 2014, 04:22 PM
Hi
When multicolumn combo box has DropDownList style, the user is not able to actually write text in to the ComboBox.
Kind regards.
Tags
MultiColumn ComboBox
Asked by
IT Development
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
IT Development
Top achievements
Rank 1
Hadi
Top achievements
Rank 1
Share this question
or