bind to webservice

2 posts, 0 answers
  1. jtby
    jtby avatar
    43 posts
    Member since:
    Feb 2007

    Posted 21 Dec 2009 Link to this post

    ... 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?
  2. Valeri Hristov
    Admin
    Valeri Hristov avatar
    2252 posts

    Posted 23 Dec 2009 Link to this post

    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.
Back to Top