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

RadCombobox Selected index change event not fired.

3 Answers 167 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Alexey
Top achievements
Rank 1
Alexey asked on 13 Oct 2008, 09:48 AM
Hello,

When i have AutoPostback = true the selectedIndex chnaged event is fired correctly. But i do not want to have postback. But when i remove (AutoPostback = true) event do not fires. Could you please help me how both to hire this event and not to have a postback?

Thanks for your time.

Here are the sode examples:

 

<radAjaxC:RadComboBox ID="radComboAdressLine1" runat="server" Width="248px"

 

 

AllowCustomText="True" ShowToggleImage="false" ShowMoreResultsBox="false" Skin="Outlook"

 

 

EnableLoadOnDemand="True" MarkFirstMatch="True"

 

 

OnItemsRequested="radComboAdressLine1_ItemsRequested"

 

 

AutoPostBack = "true"

 

 

onselectedindexchanged="radComboAdressLine1_SelectedIndexChanged"

 

 

CausesValidation="false"

 

 

MaxLength="34"

 

 

>

 

protected

void radComboAdressLine1_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e){
....

 

}

3 Answers, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 13 Oct 2008, 10:59 AM
Hello Alexey,

Actually this is expected behavior of RadComboBox. You can set AutoPostBack property to false and postback from a different control, asp button for example, to fire the selectedIndexChanged event.

Regards,
Yana
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Alexey
Top achievements
Rank 1
answered on 13 Oct 2008, 11:15 AM
Thanks a lot,

But what i need is not to have any postbacks on the page. I want it to be ajax based at all.
But also  i want to do some server code when the selected index is changed. I tried to do that in selectedchanged event handler but the event is not hired.

The question is How to do that server code ajax-based without a postback? 
Do you have some ajax based example how to do that?
0
Yana
Telerik team
answered on 13 Oct 2008, 11:56 AM
Hello Alexey,

I suggest you use RadAjaxPanel in your case. You can check our online example here.

All the best,
Yana
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
ComboBox
Asked by
Alexey
Top achievements
Rank 1
Answers by
Yana
Telerik team
Alexey
Top achievements
Rank 1
Share this question
or