Quantcast
Channel: Telerik Forums RSS
Viewing all articles
Browse latest Browse all 94857

Binding to local json file

$
0
0

Hi,

 I need to update the list view data source based on tree view node click.I got the datasource as json using ajax call but can't able to set to list view.Can you able to help me on this to set the datasource.

function onSelect(e) {
        var id = e.sender.dataItem(e.node).get("id");

        $.ajax({
            type: "POST",
            url: '@Url.Action("getValuesonNodeClick", "Home")',
            data: { node: id }, // the data in JSON format.  Note it is *not* a JSON object, is is a literal string in JSON format
            success: OnGetSelectNodeSuccess,
            error: OnGetMemberError
        });

    }

 function OnGetSelectNodeSuccess(datasource1, status) {
 var dataSource = new kendo.data.DataSource({data: datasource1});
   $("#listview").kendoListView({
            dataSource: dataSource,
            template: "#:template#"
        });
}

Viewing all articles
Browse latest Browse all 94857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>