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

[Solved] RadCombo loses its selection and data when the form submits

2 Answers 110 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Sudeep Jesani
Top achievements
Rank 1
Sudeep Jesani asked on 28 Jan 2010, 05:21 PM
Hi,

I have 2 combo boxes on a page. The second one is dependent on the data selected in the first. The first one is loaded on page load. 

Everything works fine till this step.

1. User comes to screen, selects data in 1st combo. 
2. 2nd combo gets populated. User selects data in 2nd combo. 

Now here I have autopostback=true, and OnSelectedIndexChanged="RadComboBox2_SelectedIndexChanged", which hits the server and populates a Grid control. 

The problem I am facing is that when the form comes back, I have lost the data and the selected value in the 2nd dropdown. As a result, the grid control also doesnt get any data. 

This is how the 2nd combo looks. 
        <telerik:RadComboBox style="margin-left: 77%" ID="RadComboBox2" runat="server"  
          Skin="Windows7" OnClientItemsRequested="ItemsLoaded" 
          OnClientSelectedIndexChanging="LoadFunds" OnSelectedIndexChanged="RadComboBox2_SelectedIndexChanged" 
          OnItemsRequested="RadComboBox2_ItemsRequested" Width="350px" AutoPostBack="true"
        </telerik:RadComboBox> 
 


Any help would be appreciated here.

Thanks.

2 Answers, 1 is accepted

Sort by
0
sitefinitysteve
Top achievements
Rank 2
Iron
Iron
Veteran
answered on 29 Jan 2010, 03:46 AM
0
Kalina
Telerik team
answered on 02 Feb 2010, 02:06 PM
Hello Steve,

I suggest you use an ajax panel, and handle SelectedIndexChanged event on the server.

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
Sudeep Jesani
Top achievements
Rank 1
Answers by
sitefinitysteve
Top achievements
Rank 2
Iron
Iron
Veteran
Kalina
Telerik team
Share this question
or