Sourabh Choubey

Sourabh Choubey

  • NA
  • 236
  • 43.9k

i am getting type error as $(...).datableisnot a function

Dec 22 2016 4:19 PM
i am getting type error as $(...).datatable is not a function
 
 
here is my code
 
 <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ParticularsDetails.aspx.cs" Inherits="Particular.ParticularsDetails" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script src="JS/jquery-1.3.2.min.js"></script>
<script src="Cntent/datatable.js"></script>
</head>
<body>
<form id="form1" runat="server">
<script type="text/javascript">
jQuery(document).ready(function () {
debugger; //
$("<%=GridParticulars.ClientID%>").dataTable();
});
</script>

<%-- <asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>--%>
<div>
<asp:GridView ID="GridParticulars" AutoGenerateColumns="false" runat="server" DataKeyNames="ID" AllowPaging="true" AlternatingRowStyle-Width="100%">
<Columns>
<%-- <asp:TemplateField>
<HeaderTemplate>
ID
</HeaderTemplate>
<ItemTemplate>
<%#Eval("ID") %>
</ItemTemplate>
</asp:TemplateField>--%>
<asp:BoundField DataField = "ID" HeaderText = "ID" HtmlEncode = "true" />
<asp:TemplateField>
<HeaderTemplate>
ParticullarsItems
</HeaderTemplate>
<ItemTemplate>
<%#Eval("Particulars") %>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>
Date
</HeaderTemplate>
<ItemTemplate>
<%#Eval("Date", "{0:M-dd-yyyy}") %>
</ItemTemplate>
</asp:TemplateField>

<asp:TemplateField>
<HeaderTemplate>
TotalAmount
</HeaderTemplate>
<ItemTemplate>
<%#Eval("TotalAmounts") %>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>
ViewDetails
</HeaderTemplate>
<ItemTemplate>
<%-- <asp:HyperLink runat="server" NavigateUrl= '<%# Eval("ID", "ParticularsItemDetails.aspx?CategoryID={0}") %>' Text="ViewDetails" />--%>
<asp:LinkButton ID="lnkEdit" runat="server" Text = "Edit" OnClick = "Edit"></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>

</Columns>
</asp:GridView>
</div>
<asp:Panel ID="chkPanel" runat="server" CssClass="modalPopup" style = "display:none">
<asp:Label ID="Lblmsg" runat="server"></asp:Label>
<asp:CheckBoxList ID="Checkboxitem" runat="server" BackColor="Yellow"></asp:CheckBoxList>
<asp:Button ID="btnCancel" runat="server" Text="Cancel" OnClientClick = "return Hidepopup()"/>
<asp:Button ID="btnupdate" runat="server" Text="update" OnClick="btnupdate_Click"
/>
</asp:Panel>
<asp:LinkButton ID="lnkFake" runat="server"></asp:LinkButton>
<%--<ajaxToolkit:ModalPopupExtender ID="popup" runat="server" PopupControlID="chkPanel" TargetControlID = "lnkFake"
BackgroundCssClass="modalBackground"></ajaxToolkit:ModalPopupExtender>--%>
<%-- </ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID = "GridParticulars" />
<asp:AsyncPostBackTrigger ControlID = "btnupdate" />
</Triggers>
</asp:UpdatePanel>--%>

</form>

<script type = "text/javascript">

<%-- function BlockUI(elementID) {
debugger;
var prm = Sys.WebForms.PageRequestManager.getInstance();
prm.add_beginRequest(function () {
$("#" + elementID).block({
message: '<table align = "center"><tr><td>' +
'<img src="Images/loadingAnim.gif"/></td></tr></table>',
css: {},
overlayCSS:{
backgroundColor: '#ffffccc', opacity: 0.6
}
});
});
prm.add_endRequest(function () {
$("#" + elementID).unblock();
});
}
$(document).ready(function () {
debugger;
BlockUI("<%=chkPanel.ClientID %>");
$.blockUI.defaults.css = {};
});--%>
function Hidepopup() {
debugger;
$find("popup").hide().block;
return false;
}
</script>
</body>

</html>

Answers (2)