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

bind to webservice

1 Answer 90 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
jtby
Top achievements
Rank 1
jtby asked on 21 Dec 2009, 03:03 PM
... trying to determine how much time it will take to move a "radcontrols for asp.net ajax" project to "radcontrols for silverlight.  We have quite a but of asp.net ajax radcombo boxed populated by external web serivces and don't want to re-write them all.

web serivce running on different web service like:   Public

 

Function GetEEElist(ByVal context As Object) As RadComboBoxItemData()

 

... and radcontrols asp.net ajax app like this;

<telerik:RadComboBox ID="RadComboBoxEEE AutoPostBack="true"  EnableLoadOnDemand="true"  runat="server">
<WebServiceSettings Method="GetEEElist" Path="EEElist.asmx" /></telerik:RadComboBox>

 ... since the web service works great already, I would like to use it to now populate a Silverlight RadComboBox - but RadComboBoxItem is from the ASP.NET library, not the silverlight.  Examples to populate silverlight radcombobox follow quite different patterns.  Any advice to tweak the web service as minimally as possible to make it work with silverlight radcombobox?

1 Answer, 1 is accepted

Sort by
0
Valeri Hristov
Telerik team
answered on 23 Dec 2009, 04:26 PM
Hi John,

The general guideline is to return the raw business objects from the service, then bind their properties to the control items. Our online examples that demonstrate data-binding use generic data objects that are created in the example for simplicity, but usually you will return similar objects from the web service:
http://demos.telerik.com/silverlight/#ComboBox/DataBinding

I suppose that you return RadComboBoxItem objects from your web service, so you should instead of creating them, return the underlying data objects and let RadComboBox for Silverlight automatically create its items.

Best wishes,
Valeri Hristov
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
jtby
Top achievements
Rank 1
Answers by
Valeri Hristov
Telerik team
Share this question
or