0
我有一個Kendo UI grid
,它在開發中非常有用。當我將其部署到生產環境時,僅列其中一列(銷售人員)中的數據不會顯示。我根本沒有錯誤。當我查看源代碼時,td只是空的。我已經使用了Stackoverflow多年,從未問過問題。任何幫助將不勝感激。Kendo UI Grid一列不顯示數據
<script>
$("#gridDirectSOsWithoutPOs").kendoGrid({
dataSource: {
transport: {
read: function(options) {
$.ajax({
type: "POST",
url: "salesorder_home.aspx/GetDirectSOsWithoutPOs",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function(data) {
options.success(data);
$("tr", "#gridDirectSOsWithoutPOs").each(function(idx, elem) {
var valCell2 = $(":nth-child(2)", elem).html();
if (valCell2 < 90) {
$(":nth-child(2)", elem).addClass('redCell');
}
});
},
error: function(xhr, textStatus, errorThrown) {
alert(xhr.responseText);
}
});
}
},
schema: {
data: "d",
model: {
fields: {
PromiseDate: {
type: "date"
},
DaysLeft: {
type: "number"
},
SODate: {
type: "date"
},
Salesperson: {
type: "string"
},
OrderNumber: {
type: "number"
},
OrderAmount: {
type: "number"
}
}
}
}
},
filterable: false,
sortable: true,
columns: [{
field: "PromiseDate",
title: "Promise Date",
template: "#= kendo.toString(kendo.parseDate(PromiseDate, 'yyyy-MM-dd'), 'M/d/yyyy') #",
width: 80,
attributes: {
style: "text-align: center;"
}
}, {
field: "DaysLeft",
title: "Days Left",
width: 45,
attributes: {
style: "text-align: center;"
}
}, {
field: "SODate",
title: "SO Date",
template: "#= kendo.toString(kendo.parseDate(SODate, 'yyyy-MM-dd'), 'M/d/yyyy') #",
width: 80,
attributes: {
style: "text-align: center;"
}
}, {
field: "Customer",
title: "Customer",
template: '<a href="javascript:window.location(\'../customer/customer.aspx?number=#=Number#\')" style="text-decoration: none;">#=Customer#</a>',
width: 150
}, {
field: "VendorCountry",
title: "Vendor Country",
width: 55,
attributes: {
style: "text-align: center;"
}
}, {
field: "Salesperson",
title: "Salesperson",
width: 120
//attributes: {
// style: "text-align: center;"
//}
}, {
field: "OrderNumber",
title: "Order Number",
template: '<a href="javascript:window.location(\'../salesorder/salesorder.aspx?ordnum=#=OrderNumber#\')" style="text-decoration: none;">#=OrderNumber#</a>',
width: 60,
attributes: {
style: "text-align: center;"
}
}, {
field: "OrderAmount",
title: "Order Amount",
format: "{0:n0}",
width: 70,
attributes: {
style: "text-align: right;"
}
}]
});
</script>
<div id="gridDirectSOsWithoutPOs" class="k-grid"></div>
如果可能的話(在pastebin或其他)中轉儲您的請求數據結果(包括dev和production)。這種方式很難告訴你什麼問題可以。 – DontVoteMeDown
那麼這裏是發展的轉折點。現在我需要弄清楚如何從生產中獲得相同的轉儲。可能需要編寫代碼將它返回到服務器並保存文件? [鏈接] http://pastebin.com/A0qFJYQt –
你可以使用提琴手或一些類似的網絡嗅探器來獲取數據? – Icepickle