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

Populating Server Side Web Service

3 Answers 75 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
FierceMuppet
Top achievements
Rank 1
FierceMuppet asked on 12 Aug 2008, 02:32 PM
I have a set of cascading comboboxes that are working with Web Services without a problem.  I need to have values pre-selected in these comboboxes when the page loads.  I would like to make use of the web services that I use on the client to populate on the server side when the page loads.

Any ideas?

3 Answers, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 13 Aug 2008, 02:38 PM
Hello,

Thank you for contacting us.

I suggest you use the following code snippet in your Page_Load method:

String Combo1_SelectedVal = ...;
String Combo2_SelectedVal = ...;  
             
LoadRadComboBoxItems1();  
RadComboBox1.ClearSelection();  
RadComboBox1.SelectedValue = Combo1_SelectedVal;  
RadComboBox2.ClearSelection();  
LoadRadComboBoxItems2(Combo1_SelectedVal);  
RadComboBox2.SelectedValue = Combo2_SelectedVal; 

where RadComboBox2 items depend on the selected item of RadComboBox1.

I hope this helps.

Regards,
Yana
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
FierceMuppet
Top achievements
Rank 1
answered on 13 Aug 2008, 02:44 PM
I do not see how this helps at all.  The code suggested does not help me populate the combo boxes with a web service.  The code snippet uses a function LoadRadComboBoxItems1 and LoadRadComboBoxItems2.  Where these supposed to be in the snippet?
0
Yana
Telerik team
answered on 15 Aug 2008, 12:47 PM
Hello,

I apologize for not understanding you in the first place.

You can select RadComboBox items when the page loads with JavaScript.

I prepared a small demo project showing this approach.

Please download it and give it a try.

Regards,
Yana
the Telerik team

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