I am trying to load data using datatable, but when I try to pull bulk data like more than 25k that time it should show loading image or any text like "Please wait .. ".
Javascript
$(document).ready(function () {
$(function () {
$('[id*=gv_order]').prepend($("<thead></thead>").append($(this).find("tr:first"))).DataTable({
"responsive": true,
"sPaginationType": "full_numbers",
"ordering": true
});
});
});
GridView
<asp:GridView ID="gv_order" runat="server" AutoGenerateColumns="false" CssClass="table table-bordered table-striped display" DataKeyNames="t_orno" Width="100%">
<Columns>
<asp:TemplateField HeaderText="#" HeaderStyle-HorizontalAlign="Left">
<ItemTemplate>
<asp:Label Text='<%# Container.DataItemIndex + 1 %>' runat="server" />
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="t_orno" HeaderText="Order No" />
<asp:BoundField DataField="t_odat" HeaderText="Creation Date" DataFormatString="{0:dd-MM-yyyy}" />
<asp:BoundField DataField="t_ddat" HeaderText="Delivery Date" DataFormatString="{0:dd-MM-yyyy}" />
<asp:BoundField DataField="t_termop" HeaderText="Terms of Payment" />
<asp:BoundField DataField="t_suno" HeaderText="Supplier Code" />
</Columns>
</asp:GridView>
Code Behind
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
If Not IsPostBack Then
Me.BindGrid()
End If
End Sub
Private Sub BindGrid()
dbconn.OpenConnection()
Dim query As String
query = "sp_t_getPOSummary"
Dim cmd As SqlCommand = New SqlCommand(query)
Dim sda As SqlDataAdapter = New SqlDataAdapter()
cmd.Connection = dbconn.con
sda.SelectCommand = cmd
Dim ds = New DataSet
sda.Fill(ds)
Dim dt = ds.Tables(0)
If dt.Rows.Count = 0 Then
' lblreqnerror.Visible = True
Else
gv_purchase_order.DataSource = ds
gv_purchase_order.DataBind()
End If
dbconn.CloseConnection()
End Sub
I tried putting below code but no luck
<asp:UpdateProgress ID="UpdateProgress1" runat="Server" AssociatedUpdatePanelID="UpdatePanel1" DisplayAfter="1">
<ProgressTemplate >
<asp:Label ID="lblwait" runat="server" Text="Please wait.."></asp:Label>
</ProgressTemplate>
</asp:UpdateProgress>