clientside databinding

2 posts, 0 answers
  1. Ingo Oltmann
    Ingo Oltmann avatar
    44 posts
    Member since:
    Nov 2005

    Posted 16 Feb 2012 Link to this post


    I am facing the following issue. When I use this approach to bind data on clientside, the datalist is rendered on pageload:

    <telerik:RadListView ID="ListViewCarImages" runat="server" AllowPaging="false" PageSize="999">
        <div id="listView">
          <div id="items">
        <ClientEvents />  
        <DataBinding ItemPlaceHolderID="items">
              <DataService Location="~/AluWebService.asmx" DataPath="CarsImagesList" />

    but when I choose this approach, no data is rendered at all though the data is sent over the wire as seen using httpfox:

                <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
                    <asp:ServiceReference Path="~/AluWebService.asmx" /> 


    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
      <script type="text/javascript">
          function pageLoad() {
              listView = $find("<%= ListViewCarImages.ClientID %>");
              var xyz = AluWebService.CarsImagesList();

    any idea why the second approach does not work?


  2. Veli
    Veli avatar
    2002 posts

    Posted 21 Feb 2012 Link to this post

    Hi Ingo,

    The second approach does not work, because web service calls asynchronous. The AluWebService.CarsImagesList() method does not return the data synchronously. Instead, it accepts a success callback that will be called one the data is retrieved:

    function pageLoad() {
        listView = $find("<%= ListViewCarImages.ClientID %>");
        AluWebService.CarsImagesList(function(result) {

    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Back to Top