I am trying to get client-side data binding from a web service working for RadListView. I am not getting any errors, but it doesn't seem to be binding. I am using Newtonsoft JSON converter to generate the JSON response.
Here's the web service method:
Here is the JSON response that I am getting:
Why is the binding not working? Something simple I've missed?
<telerik:RadListView ID="lvWall" runat="server" AllowPaging="false"> <ClientSettings> <DataBinding ItemPlaceHolderID="itemPlaceholder"> <LayoutTemplate> <ul id="itemPlaceholder"></ul> </LayoutTemplate> <ItemTemplate> <li>#= WallText #</li> </ItemTemplate> <DataService Location="~/Engine.asmx" DataPath="Wall" /> </DataBinding> </ClientSettings></telerik:RadListView>Here's the web service method:
[WebMethod]public string Wall(){
DataSet ds = new DataSet(); try
{ SqlCommand comm = new SqlCommand("xbCircled_Wall", conn); comm.CommandType = CommandType.StoredProcedure; comm.Parameters.Add(new SqlParameter("@userID", 7)); comm.Parameters.Add(new SqlParameter("@profileID", 9)); SqlDataAdapter adapter = new SqlDataAdapter(comm); conn.Open(); adapter.Fill(ds); } catch (Exception ex) { //throw new ServiceException("Error desription here", ex); } finally { conn.Close(); }return JsonConvert.SerializeObject(ds);}Here is the JSON response that I am getting:
{"d":"{\"Table\":[{\"WallID\":685,\"comments\":0,\"imageUrl\":\"http://www.bCircled.com/Assets/Uploaded-Photos/5b63d780-b01c-429b-9178-9efe4a4d8b84.jpg\",\"FromUserID\":9,\"FromFullName\":\"Jon Collins\",\"ToUserID\":9,\"ToFullName\":null,\"WallText\":\"A post to my own wall (status update) by Jon\",\"datePosted\":\"12 days ago\",\"actualDate\":\"2012-11-27T18:09:07.723\"}]}"}Why is the binding not working? Something simple I've missed?