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

Manually trigger SelectedIndexChanged event ? Might need concept change

1 Answer 35 Views
This is a migrated thread and some comments may be shown as answers.
Hadi Teo
Top achievements
Rank 1
Hadi Teo asked on 28 Apr 2009, 03:55 AM

Here are the scenario :
1) There are 2 combo boxes : Topic and SubTopic . One topic has one-to-many subtopics.
2) The selection of the topic will determine the list of the displayed subtopics
3) RadAjax has been configured on the topic combo box so that it will trigger the topic_selectedIndexChanged event by using AJAX. the topic combo box has been configured with AutoPostBack = true
4) The AjaxSetting has been configured to this :
              <telerik:AjaxSetting AjaxControlID="ddlTopic" EventName="ddlTopic_SelectedIndexChanged">
                        <telerik:AjaxUpdatedControl ControlID="ddlSubTopic" LoadingPanelID="LoadingPanel1" />

Here are the issues :
1) At the "create" form scenario, when i obtained the topic and subtopic value from the UI (user interaction), this is working well.
2) At the "update" form scenario, when i need to configure the selected topic value as well as selected subtopic value, i need to manually trigger the topic_selectedIndexChanged event to prepopulate the subtopic combo box, from the server side.

One of the alternative that i have think of , which is not quite elegant is to populate the data source of the subtopic and then set the subtopic selected value.

Please let me know if my approach is not correct or any insight to my issue.


hadi teo

1 Answer, 1 is accepted

Sort by
Veselin Vasilev
Telerik team
answered on 30 Apr 2009, 07:44 AM
Hello Hadi Teo,

You did it in the correct way - populate the topic and its subtopics and then select the appropriate subtopic in the code behind.

Veselin Vasilev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Asked by
Hadi Teo
Top achievements
Rank 1
Answers by
Veselin Vasilev
Telerik team
Share this question