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

Binding list view client Side

2 Answers 103 Views
ListView
This is a migrated thread and some comments may be shown as answers.
Dhaval
Top achievements
Rank 2
Dhaval asked on 21 Mar 2012, 07:02 AM
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 Answers, 1 is accepted

Sort by
0
Dhaval
Top achievements
Rank 2
answered on 23 Mar 2012, 05:57 AM
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..
0
Tsvetina
Telerik team
answered on 23 Mar 2012, 12:05 PM
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.
Tags
ListView
Asked by
Dhaval
Top achievements
Rank 2
Answers by
Dhaval
Top achievements
Rank 2
Tsvetina
Telerik team
Share this question
or