My GridView line disappears when i bind GridView. This appears after deleting a record.
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Editsubcodes.aspx.vb" Inherits="SLISWEB2023.Editsubcodes" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title> Edit SubCodes Data </title>
<script type="text/javascript" src="../Scripts/jqueryb 1.8.3.min.js"></script>
<script type="text/javascript" src="../Scripts/Jquery.datatables.min.js"></script>
<script type="text/javascript" src="../Scripts/datatable.fixedColumns.min.js"></script>
<link href="../Scripts/Jquery.datatables.min.css" rel="stylesheet" type="text/css" />
<link href="../Scripts/fixedColumns.dataTables.min.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
$(function () {
$('#CateauditGrid tfoot tr').appendTo('#CateauditGrid thead');
$('#CateauditGrid').removeAttr('width').DataTable({
bLengthChange: true,
lengthMenu: [[10, 15, -1], [10, 15, "All"]],
bFilter: true,
bSort: true,
scrollCollapse: true,
paging: true,
fixedColumns: false,
orderCellsTop: true
});
});
</script>
</head>
<body style="width: 1125px; height: 435px;">
<form id="form1" runat="server">
<div>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<table class="auto-style1">
<tr>
<td class="auto-style54">Call No</td>
<td class="auto-style33" colspan="4">
<asp:TextBox ID="Callno" runat="server" Width="95px"></asp:TextBox>
</td>
<td class="auto-style15">
Entry Code</td>
<td class="auto-style15" colspan="2">
<asp:Label ID="EntryCode" runat="server" Text="EntryCode"></asp:Label>
</td>
<td class="auto-style19" colspan="7">Current User</td>
<td class="auto-style15" colspan="11">
<asp:Label ID="CurrentUser" runat="server" Text="CurrentUser"></asp:Label>
</td>
</tr>
<tr>
<td class="auto-style54">Book Name</td>
<td class="auto-style19" colspan="25">
<asp:TextBox ID="BookName" runat="server" Width="581px"></asp:TextBox>
</td>
</tr>
<tr>
<td class="auto-style54">Author</td>
<td class="auto-style19" colspan="3">
<asp:TextBox ID="Author" runat="server" Width="204px"></asp:TextBox>
</td>
<td class="auto-style19" colspan="3">Group</td>
<td class="auto-style61" colspan="6">
<asp:DropDownList ID="Groupdata" runat="server" Height="23px" Width="230px">
<asp:ListItem>NONE</asp:ListItem>
<asp:ListItem>Olevel Book</asp:ListItem>
<asp:ListItem>ADVANCED LEVEL</asp:ListItem>
<asp:ListItem>PRIMARY</asp:ListItem>
</asp:DropDownList>
</td>
<td class="auto-style19" colspan="13"> </td>
</tr>
<tr>
<td class="auto-style54">Subject</td>
<td class="auto-style19" colspan="25">
<asp:DropDownList ID="SubjectData" runat="server" Height="26px" Width="584px" AutoPostBack="True">
</asp:DropDownList>
</td>
</tr>
<tr>
<td class="auto-style66">Editions</td>
<td class="auto-style67" colspan="3">
<asp:DropDownList ID="Editionsdata" runat="server" Height="22px" Width="238px">
</asp:DropDownList>
</td>
<td class="auto-style67" colspan="2">Publisher</td>
<td class="auto-style68" colspan="3">
<asp:TextBox ID="Publisher" runat="server" Width="141px"></asp:TextBox>
</td>
<td class="auto-style68" colspan="3"> </td>
<td class="auto-style69" colspan="2">Year Published</td>
<td class="auto-style68" colspan="5">
<asp:TextBox ID="YearPublished0" runat="server" CssClass="auto-style64" Width="119px"></asp:TextBox>
</td>
<td class="auto-style68" colspan="2">
Shelf</td>
<td class="auto-style68" colspan="2">
<asp:DropDownList ID="Ddlshelves" runat="server">
<asp:ListItem>NONE</asp:ListItem>
<asp:ListItem>SHELF TWO</asp:ListItem>
<asp:ListItem>SHELF THREE</asp:ListItem>
<asp:ListItem>SHELF FOUR</asp:ListItem>
<asp:ListItem>SHELF FIVE</asp:ListItem>
<asp:ListItem>SHELF SIX</asp:ListItem>
</asp:DropDownList>
</td>
<td class="auto-style68" colspan="3"></td>
</tr>
<tr>
<td class="auto-style35">
ISBN</td>
<td class="auto-style6" colspan="4">
<asp:TextBox ID="ISBN" runat="server" Width="204px"></asp:TextBox>
</td>
<td class="auto-style25" rowspan="2">Notes</td>
<td colspan="5" rowspan="2">
<asp:TextBox ID="Notes" runat="server" TextMode="MultiLine" Width="217px"></asp:TextBox>
</td>
<td colspan="5"> </td>
<td colspan="3"></td>
</tr>
<tr>
<td class="auto-style36">ISSN</td>
<td class="auto-style37" colspan="4">
<asp:TextBox ID="ISSN" runat="server" Width="204px"></asp:TextBox>
</td>
<td colspan="7">Preceding Zeros:</td>
<td class="auto-style49" colspan="2">
<asp:CheckBox ID="CheckBox1" runat="server" />
</td>
<td colspan="4">
<asp:DropDownList ID="Nt" runat="server" CssClass="auto-style46" Height="23px" Width="56px">
<asp:ListItem>1</asp:ListItem>
<asp:ListItem>2</asp:ListItem>
<asp:ListItem>3</asp:ListItem>
<asp:ListItem>4</asp:ListItem>
<asp:ListItem>5</asp:ListItem>
</asp:DropDownList>
</td>
<td> </td>
<td>
<asp:TextBox ID="Code2" runat="server" Width="23px"></asp:TextBox>
</td>
</tr>
<tr>
<td class="auto-style54">Maximum</td>
<td class="auto-style58">
<asp:TextBox ID="Minimum0" runat="server" Width="48px"></asp:TextBox>
</td>
<td class="auto-style60">
<asp:TextBox ID="Accs" runat="server" Visible="False" Width="31px"></asp:TextBox>
</td>
<td class="auto-style19"><strong>Category</strong></td>
<td class="auto-style15" colspan="2">
<asp:DropDownList ID="DdlTypes" runat="server">
<asp:ListItem>BY SCHOOL</asp:ListItem>
<asp:ListItem>DONATED</asp:ListItem>
<asp:ListItem>NOT USED</asp:ListItem>
<asp:ListItem>WISHERS</asp:ListItem>
<asp:ListItem>NONE</asp:ListItem>
</asp:DropDownList>
</td>
<td class="auto-style19" colspan="2">Qty</td>
<td class="auto-style19">
<asp:TextBox ID="Qty" runat="server" Width="49px"></asp:TextBox>
</td>
<td class="auto-style19">Start</td>
<td class="auto-style19" colspan="5">
<asp:TextBox ID="start" runat="server" Width="123px"></asp:TextBox>
</td>
<td class="auto-style50" colspan="2">CostPrice</td>
<td class="auto-style57" colspan="2">
<asp:TextBox ID="CostPrice" runat="server" Width="78px"></asp:TextBox>
</td>
<td class="auto-style55" colspan="3">Date</td>
<td class="auto-style15" colspan="4">
<asp:TextBox ID="Dater" runat="server" Width="96px"></asp:TextBox>
</td>
</tr>
<tr>
<td colspan="26"></td>
</tr>
<tr>
<td class="auto-style15" colspan="26">
<asp:RadioButtonList ID="RadioButtonList2" runat="server" AutoPostBack="True" BorderColor="Blue" BorderStyle="Double" RepeatDirection="Horizontal" Width="1071px">
<asp:ListItem>None</asp:ListItem>
<asp:ListItem>Back To Menu</asp:ListItem>
<asp:ListItem>Update Data</asp:ListItem>
<asp:ListItem>Post Books</asp:ListItem>
<asp:ListItem>Process Accessioning</asp:ListItem>
<asp:ListItem>Delete Single Book</asp:ListItem>
<asp:ListItem>Transfer Accession numbers</asp:ListItem>
</asp:RadioButtonList>
</td>
</tr>
<tr>
<td class="auto-style5" colspan="26">
<asp:GridView ID="CateauditGrid" runat="server" AutoGenerateColumns="False" Height="129px" Width="1201px">
<Columns>
<asp:BoundField DataField="Groupcode" HeaderText="CallNo" />
<asp:BoundField DataField="Bookcode" HeaderText="AccNumber" />
<asp:BoundField DataField="BookName" HeaderText="BookName" />
<asp:BoundField DataField="author" HeaderText="Author" />
<asp:BoundField DataField="Category" HeaderText="Subject" />
<asp:BoundField DataField="Types" HeaderText="Type" />
<asp:BoundField DataField="CostPrice" HeaderText="CostPrice" />
<asp:BoundField DataField="Date" HeaderText="DateTime" />
<asp:BoundField DataField="Users" HeaderText="User Name" />
<asp:TemplateField HeaderText="Delete">
<ItemTemplate>
<asp:LinkButton ID="lnkRemove" runat="server"
CommandArgument='<%# Eval("bookcode")%>' OnClick="DeleteCustomer"
OnClientClick="return confirm('Do you want to delete?')" Text="Delete"></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</td>
</tr>
</table>
</ContentTemplate>
</asp:UpdatePanel>
</div>
<script type="text/javascript">
//On UpdatePanel Refresh
var prm = Sys.WebForms.PageRequestManager.getInstance();
if (prm != null) {
prm.add_endRequest(function (sender, e) {
if (sender._postBackSettings.panelsToUpdate != null) {
$('[id$=CateauditGrid]').prepend($("<thead></thead>").append($('[id$=CateauditGrid]').find("tr:first"))).DataTable({
"responsive": true,
"sPaginationType": "full_numbers"
});
}
});
};
</script>
</form>
</body>
</html>