如何从Json对象绑定到Kendo Grid? Output结果需要直接从Jquery绑定到kendo网格。 [英] How to bind to Kendo Grid from Json object? The Output result need to bind to kendo grid from Jquery directly.

查看:58
本文介绍了如何从Json对象绑定到Kendo Grid? Output结果需要直接从Jquery绑定到kendo网格。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

function AllcarDetails() {

        $.ajax({

            type: "GET",

            url: "http://localhost:63461/api/CarDetails",

            dataType: "json",

            success: function (data) {

                //alert(this.url)

		var grid = $('#grid').kendoGrid();
                grid.dataSource.data(data);

                //var datavalue = data;

                //var myJsonObject = datavalue;

                //alert(data["Table"][0].Voucher_No);

                //debugger;

                
                alert('bought all data successfully');
            },
            error: function (xhr) {
                alert(xhr.responseText);
            }
        });
    }

推荐答案

.ajax({

type:& quot; GET& quot ;,

url:& quot; http:// localhost:63461 / api / CarDetails& quot;,

dataType:& quot; json& quot;,

成功:函数(数据){

//alert(this.url)

var grid =
.ajax({ type: "GET", url: "http://localhost:63461/api/CarDetails", dataType: "json", success: function (data) { //alert(this.url) var grid =


('#grid')。kendoGrid();
grid.dataSource.data(data);

// var datavalue = data;

// var myJsonObject = datavalue;

//alert(data["Table"][0].Voucher_No);

// debugger;


alert('成功购买所有数据');
},
错误:函数(xhr){
alert(xhr.responseText);
}
});
}
('#grid').kendoGrid(); grid.dataSource.data(data); //var datavalue = data; //var myJsonObject = datavalue; //alert(data["Table"][0].Voucher_No); //debugger; alert('bought all data successfully'); }, error: function (xhr) { alert(xhr.responseText); } }); }


这篇关于如何从Json对象绑定到Kendo Grid? Output结果需要直接从Jquery绑定到kendo网格。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆