不支持wijgrid对象

时间:2017-08-29 14:38:21

标签: javascript asp.net wijmo

我有一个asp.net项目,它由一个母版页和内容页组成。我的一个内容页面上有一个名为table1的表格。我试图在JavaScript中配置网格但收到错误:

JavaScript runtime error: Object doesn't support property or method 'wijgrid'

错误引用的代码行位于pageLoad函数内。确切的行看起来像这样:

$("#table1").wijgrid();

我创建了一个空白网页,其中包含类似的代码。任何人都可以解释为什么这不起作用吗?

<asp:Table ID="table1" runat="server">
</asp:Table>

这是我的代码,它试图设计和填充网格:

<asp:Table ID="table1" runat="server">
                </asp:Table>

$.ajax({
        type: "post",
        async: false,
        url: "CICBatchTransfer.aspx/GetCICs",
        data: "{'sNavCode':'" + $('#drpSiteSource').val() + "','sAreaCode':'" + $("#drpAreaSource").val() + "'}",
        contentType: "application/json; charset=utf-8",
        dataType: "json",
        success: function (r) {
            cicdata = r.d;
            cicdata = jQuery.parseJSON(cicdata)
            $("#grdCICs").wijgrid({
                showFilter: true,
                allowPaging: false,
                ensureColumnsPxWidth: true,
                scrollMode: "vertical",
                data: cicdata,
                columnsAutogenerationMode: "none",
                columns: [
                        { dataKey: "CI_REFNO", headerText: "CI_REFNO", dataType: "number", visible: false },
                        { dataKey: "CI_REFERENCE", headerText: "Reference", dataType: "string", width: 115 },
                        { dataKey: "CI_DESCRIPTION", headerText: "Description", dataType: "string", width: 370 }
                    ]
            });
        },
        error: function (xhr, status, error) {
            alert('GetCICs - ' + xhr.responseText);
        }
    });​

0 个答案:

没有答案