我正在嘗試填充此劍道網(wǎng)格,但遇到了一些問題。當我給列標題時,一些列是空的,但數(shù)據(jù)在那里,因為我可以在控制臺日志中看到它。$(function () { $("#uploadBtn").click(function () { var url = window.rootUrl + 'Upload/UploadM'; var fileUpload = $("#fileID").get(0); var files = fileUpload.files; var data = new FormData(); data.append(files[0].name, files[0]); $.ajax({ url: url, type: "POST", contentType: false, // Not to set any content header processData: false, // Not to process data data: data }).done(function (res) { console.log("dataTable", res) $('#AttachGrid').empty(); $("#AttachGrid").kendoGrid({ columns: [ { field: "DATA_CATEGORY_QOS_CODE", title: "QOS" }, { field: "DOWNLOAD_SPEED_CLASS_CODE", title: "download" }, { field: "OPERATOR_OBJECTID", title: "operator" }, { field: "SETTLEMENT_CODE", title: "settlement" }, { field: "SHAPE", title: "shape" }, { field: "TECHNOLOGY_CODE", title: "tech" }, { field: "UPLOAD_SPEED_CLASS_CODE", title: "upload" }, { field: "Message", title: "message" } ], dataSource: res.Data }); }) });});這就是使用此代碼的表格的樣子所以數(shù)據(jù)在那里,但它沒有正確填充劍道網(wǎng)格。但是,如果我在沒有列屬性的情況下這樣做,它會將整個數(shù)據(jù)加載到劍道網(wǎng)格中。$.ajax({ url: url, type: "POST", contentType: false, // Not to set any content header processData: false, // Not to process data data: data }).done(function (res) { console.log("dataTable", res) $('#AttachGrid').empty(); $("#AttachGrid").kendoGrid({ dataSource: res.Data }); })我無法像這樣添加自定義列標題??赡苁鞘裁磫栴}?
Kendo Grid 不顯示所有數(shù)據(jù)/列
慕村9548890
2023-01-06 10:50:17