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

[Solved] RadComboBox help

3 Answers 137 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Chris Salas
Top achievements
Rank 1
Chris Salas asked on 21 Jan 2010, 10:04 PM
I have a RadCombo box that I am using like the Google Style type ahead and everything is working good.  Now this is what I am trying to acomplish.  I only want the OnSelectedIndexChanged event to fire if an item is selected from the dropdown, It dosent matter if it is client or server side.  Is there any way to acomplish this?

Thank you in advance,

Chris

3 Answers, 1 is accepted

Sort by
0
Kalina
Telerik team
answered on 25 Jan 2010, 02:24 PM
Hi Chris Salas,

How to handle the server-side SelectedIndexChanged event, please find out here.

About the same client-side event you can read in this help article.

Greetings,
Kalina
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
Chris Salas
Top achievements
Rank 1
answered on 25 Jan 2010, 02:29 PM
Kalina,

I understand how the SelectedIndexChanged event works.  Everything is working with that.  My question is, is there a way to only make that event occur when the user selects an Item from the dropdown?  My ComboBox allows custom text and when a user inputs a value if that value is in the dropdown then the event fires.  I want to find a way to stop that and only fire the event when an item is selected from the box.

Chris
0
Accepted
Kalina
Telerik team
answered on 29 Jan 2010, 10:03 AM
Hi Chris Salas,

I can suggest you to handle OnClientSelectedIndexChanged event with a function of this kind:

function onSelectedIndexChanging(sender, eventArgs) {
    var domEvent = eventArgs.get_domEvent();
    eventArgs.set_cancel(domEvent.type != "click");
}

It this approach is not suitable in your case, can you send some code please?

Kind regards,
Kalina
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.
Tags
ComboBox
Asked by
Chris Salas
Top achievements
Rank 1
Answers by
Kalina
Telerik team
Chris Salas
Top achievements
Rank 1
Share this question
or