I have one Gridview and in which i am using Jquery Datatable, I want to sortint and paging My Gridview so i used Datatable.
Here is the My Aspx Gridview Page Code
<asp:GridView ID="grdEmployee" runat="server" AutoGenerateColumns="false" AllowPaging="true" AllowSorting="true">
<Columns>
<asp:TemplateField HeaderText="Emp ID" SortExpression="Emp ID">
<ItemTemplate>
<asp:Label ID="lblEmpID" runat="server" Text='<%#Eval("Empid") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Emp Name" SortExpression="Emp Name">
<ItemTemplate>
<asp:Label ID="lblEmpName" runat="server" Text='<%#Eval("EmpName") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Emp Salary" SortExpression="Emp Salary">
<ItemTemplate>
<asp:Label ID="lblEmpSalary" runat="server" Text='<%#Eval("Salary") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Edit">
<ItemTemplate>
<asp:LinkButton ID="lnkEdit" runat="server" Text="Edit" CommandArgument='<%#Eval("Empid") %>' CommandName="eEdit"></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Delete">
<ItemTemplate>
<asp:LinkButton ID="lnkDelete" runat="server" Text="Delete" CommandArgument='<%#Eval("Empid") %>' CommandName="eDelete"></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
Here is the Jquery Datatable Related Code
<script src="media/js/jquery.dataTables.min.js"></script>
<link href="media/css/jquery.dataTables.css" rel="stylesheet" />
<script type="text/javascript">
$(function () {
$("#<%=grdEmployee.ClientID%>").dataTable();
});
</script>
and here is the Warning Error that i am getting
DataTables warning: table id=grdEmployee - Requested unknown parameter '1' for row 10. For more information about this error, please see http://datatables.net/tn/4
Please Help Me..
Thanks in Advance