簡體   English   中英

Kendo UI Grid一列不顯示數據

[英]Kendo UI Grid one column does not display data

我有一個Kendo UI grid ,在開發中效果很好。 當我將其部署到生產環境時,僅出現在其中一列(銷售人員)中的數據。 我完全沒有錯誤。 當我查看源代碼時,TD只是空的。 我已經使用Stackoverflow多年了,以前從未問過任何問題。 任何幫助將不勝感激。

<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>

謝謝,問題似乎已經解決。 上周我們確實遇到了一些嚴重的網絡問題,其中許多服務器之間的信任關系被破壞了。 以為他們都已經解決了,但是我現在把這歸結為“問題纏身”。 我要仔細檢查一下,是否能在今天早上正確處理所有可能的null並繼續前進。 @Icepickle:提琴手! 就在我的任務欄上。 我很少使用它,而忘記了它的存在。 再次感謝!

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM