Footer details not showing while the page is loaded ASP.Net
<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site1.Master" CodeBehind="NewSubject.aspx.vb" Inherits="SLISWEB2023.NewSubject1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<link rel="stylesheet" href="../BootStrap/Css/BootStrap3.3.2.css" />
<script type="text/javascript" src="../BootStrap/Jquery3.4.1.js"></script>
<script type="text/javascript" src="../BootStrap/Bootstrap3.3.2.min.js"></script>
<script type="text/javascript" src="../BootStrap/Jquery.Datatables.1.10.20.js"></script>
<link href="../BootStrap/Css/1.10.20.jquery.dataTables.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
$(function () {
ApplyDataTable();
});
function ApplyDataTable() {
$('[id$=SubjectsDataGrid] tfoot tr').appendTo('[id$=SubjectsDataGrid] thead');
$('[id$=SubjectsDataGrid]').removeAttr('width').DataTable({
bLengthChange: true,
lengthMenu: [[10, 15, -1], [10, 15, "All"]],
bFilter: true,
bSort: true,
autowidth: true,
scrollCollapse: true,
paging: true,
fixedColumns: false,
orderCellsTop: true
});
};
</script>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<table class="auto-style1">
<tr>
<td>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:GridView ID="SubjectsDataGrid" runat="server" AutoGenerateColumns="False" Width="958px" Height="33px" ShowFooter="True" >
<Columns>
<asp:TemplateField HeaderText="Callno">
<EditItemTemplate>
<asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("Callno") %>'></asp:TextBox>
</EditItemTemplate>
<FooterTemplate>
<asp:TextBox ID="Fcallno" runat="server" Text='<%# Bind("Callno") %>'></asp:TextBox>
</FooterTemplate>
<ItemTemplate>
<asp:Label ID="Callno" runat="server" Text='<%# Bind("Callno") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Subject">
<EditItemTemplate>
<asp:TextBox ID="TextBox2" runat="server" ItemStyle-Width="150px" Text='<%# Bind("subject") %>'></asp:TextBox>
</EditItemTemplate>
<FooterTemplate>
<asp:TextBox ID="Fsubject" runat="server" Text='<%# Bind("Callno") %>' Width="220px"></asp:TextBox>
</FooterTemplate>
<ItemTemplate>
<asp:Label ID="Subject" runat="server" Text='<%# Bind("subject") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Code">
<EditItemTemplate>
<asp:TextBox ID="TextBox3" runat="server" Text='<%# Bind("code") %>'></asp:TextBox>
</EditItemTemplate>
<FooterTemplate>
<asp:TextBox ID="Fcode" runat="server" Text='<%# Bind("Callno") %>'></asp:TextBox>
</FooterTemplate>
<ItemTemplate>
<asp:Label ID="Code" runat="server" Text='<%# Bind("code") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Order">
<EditItemTemplate>
<asp:TextBox ID="TextBox4" runat="server" Text='<%# Bind("Order") %>'></asp:TextBox>
</EditItemTemplate>
<FooterTemplate>
<asp:TextBox ID="Forder" runat="server" Text='<%# Bind("Callno") %>'></asp:TextBox>
</FooterTemplate>
<ItemTemplate>
<asp:Label ID="codeorder" runat="server" Text='<%# Bind("Order") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Subkeydata">
<EditItemTemplate>
<asp:TextBox ID="TextBox5" runat="server" Text='<%# Bind("subkey") %>'></asp:TextBox>
</EditItemTemplate>
<FooterTemplate>
<asp:Button ID="Button1" runat="server" Text="Add New" OnClick="Button1_Click1" />
</FooterTemplate>
<ItemTemplate>
<asp:Label ID="subjectkey" runat="server" Text='<%# Bind("subkey") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="DelSingle" ShowHeader="False">
<ItemTemplate>
<asp:LinkButton ID="lnkRemove" runat="server"
CommandArgument='<%# Eval("subkey")%>' OnClick="DeleteCustomer"
OnClientClick="return confirm('Do you want to delete?')" Text="Delete"></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
</td>
</tr>
</table>
</asp:Content>
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
BindGrid2000()
End If
End Sub
Private Sub BindGrid2000()
Dim constr As String = ConfigurationManager.ConnectionStrings("SLISConnectionString").ConnectionString
Using con As New SqlConnection(constr)
Using cmd As New SqlCommand("SELECT *FROM subjects", con)
Using sda As New SqlDataAdapter(cmd)
cmd.CommandType = CommandType.Text
Dim dt As New DataTable()
sda.Fill(dt)
SubjectsDataGrid.DataSource = dt
SubjectsDataGrid.DataBind()
SubjectsDataGrid.UseAccessibleHeader = True
SubjectsDataGrid.HeaderRow.TableSection = TableRowSection.TableHeader
' SubjectsDataGrid.HeaderRow.TableSection = TableRowSection.TableFooter
End Using
End Using
End Using
End Sub