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

SelectIndexChanging

1 Answer 50 Views
ComboBox and ListBox (obsolete as of Q2 2010)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jorge Delgado-Lopez
Top achievements
Rank 1
Jorge Delgado-Lopez asked on 23 May 2008, 10:34 AM
Hi,
Is there a way to supress the choosing of an item?

What I need is a readonly combobox, but I want all the functionality available since the items have descriptions and I would like the user to explore the posibilities but not be able to change them.

Thanks,
- jorge

1 Answer, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 26 May 2008, 08:45 AM
Hi Jorge Delgado-Lopez,

Currently, RadComboBox does not support the SelectedIndexChanging event. It will be implemented for one of our future releases. For the time being, I can suggest two workarounds:
  1. Use the TextChanging event of RadComboBox.ComboBoxElement to cancel the selection. However, you will not be able write in the textbox portion of the control and therefore to use the AutoCompleteMode.
  2. Keep the old selected index of RadComboBox and then set it back in the SelectedIndexChanged event handler. In addition, you should know whether the initial firing of the SelectedIndexChanged event (on Form loading) or this event is fired by the user. I have attached a sample project to demonstrate this.

I hope this helps. If you have additional questions, do not hesitate to contact me.

Sincerely yours,
Nikolay
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
ComboBox and ListBox (obsolete as of Q2 2010)
Asked by
Jorge Delgado-Lopez
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
Share this question
or