Binding list view client Side

3 posts, 0 answers
  1. Dhaval
    Dhaval avatar
    41 posts
    Member since:
    Aug 2010

    Posted 21 Mar 2012 Link to this post

    Ok, the issue is like, I want to bind list view on client side. I have found solutions on forum and demos but i am getting error on set_dataSource(data); like set_dataSource is undefined, morover, i cannot also find <DataBinding> tag within client setting as it is shown in demos. I am using 2011.2.915.40 version of telerik.

    Below is my aspx Code:

    <telerik:RadListView ID="lstViewNotes" runat="server" OnItemCommand="lstViewNotes_ItemCommand">
    <EmptyDataTemplate>
    <table id="Table1" style="">
    <tr>
    <td>
    <%=GetGlobalResourceObject("General","EmptyData") %>
    </td>
    </tr>
    </table>
    </EmptyDataTemplate>
    <ItemTemplate>
                     <table>
    <tr>
    <td colspan="3">
    <div style="width: 100%">
    <asp:HiddenField ID="hfNoteId" runat="server" Value='<%#Eval("NotesId") %>' />
    <asp:LinkButton ID="lblCreate" runat="server" Text='<%#Eval("UserName") %>' CssClass="label_n_t"
    CommandName="Select" /><asp:LinkButton ID="NameLabel" runat="server" Text='<%# Eval("CreateDate") %>'
    CssClass="label_n_t" CommandName="Select" /></div>
    <div style="width: 100%">
    <asp:LinkButton ID="lblNotesDesc" runat="server" Text='<%# Eval("MemoDesc") %>' CssClass="label_n_c"
    CommandName="Select" /><br />
    <br />
    </div>
    </td>
    </tr>
                      </table>
    </ItemTemplate>
    </telerik:RadListView>


    Below is my JS Code:    
    var listView = $find('<%= lstMemo.ClientID%>');
    listView.set_dataSource(result.lstMemo);
    listView.dataBind();
  2. Dhaval
    Dhaval avatar
    41 posts
    Member since:
    Aug 2010

    Posted 23 Mar 2012 Link to this post

    Can anyone reply to this, i want to make it done, i have followed this http://www.telerik.com/help/aspnet-ajax/listview-clientside-various-datasources.html link too but i cannot find DataBinding tag within ClientSettings, all i get is only ClientEvents..
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Tsvetina
    Admin
    Tsvetina avatar
    1876 posts

    Posted 23 Mar 2012 Link to this post

    Hi Dhaval,

    RadListView client-side binding has been introduced in Q1 2012, so you cannot get a RadListView from the previous RadControls versions to bind on the client side.
    You can also see this in the RadControls release notes:
    http://www.telerik.com/products/aspnet-ajax/whats-new/release-history/q1-2012-version-2012-1-215.aspx

    Kind regards,
    Tsvetina
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top