I have an asp.net project which consists of a master page and content pages. One of my content pages has a table on it called table1
. I am trying to configure a grid in JavaScript but receive the error:
JavaScript runtime error: Object doesn't support property or method 'wijgrid'
The line of code referenced by the error is located within the pageLoad
function. The exact line looks like this:
$("#table1").wijgrid();
I created a blank web page with similar code that works. Can anyone shed any light on why this is not working?
<asp:Table ID="table1" runat="server">
</asp:Table>
This is my code which attempts to design and populate the grid:
<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);
}
});