Hi,
I am Binding Data to the GridView, but i need to show progreebar before binding data to the GridView.The UpdateProgree is not working for me, any thing i am doing wrong here, can you please tell me.
<Table>
<tr><td> <asp:Button ID="btnView_Trace" runat="server" Text="View" OnClick="btnView_Click" /></td></tr>
<tr><td>
<asp:UpdateProgress ID="UpdateProgress1" AssociatedUpdatePanelID="UP_PNLgRID" DynamicLayout="true" runat="server">
<ProgressTemplate>
<div style="bottom:0px;bottom:0%;color:Red;position:absolute;font-size:xx-large;">Please wait ...</div>
</ProgressTemplate>
</asp:UpdateProgress>
<asp:UpdatePanel ID="UP_PNLgRID" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="dg_trc_user_info" runat="server" AutoGenerateColumns="False" Width="100%" DataKeyNames="trc_id"">
<Columns>
<asp:TemplateField HeaderText="User Name">
<ItemTemplate >
<asp:Label ID="lbl_user_name" runat="server" CssClass="BodyFieldDataGrid" Text='<%# (DataBinder.Eval(Container.DataItem, "trc_user_name"))%>'
ToolTip='<%# (DataBinder.Eval(Container.DataItem, "trc_user_name"))%>' ></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Modified Date">
<ItemTemplate >
<asp:Label ID="lbl_modified_date" runat="server" CssClass="BodyFieldDataGrid" Text='<%# (DataBinder.Eval(Container.DataItem, "trc_modified_date"))%>'
ToolTip='<%# (DataBinder.Eval(Container.DataItem, "trc_modified_date"))%>' ></asp:Label>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
</td>
</tr>
In code behind:
protected void btnView_Click(object sender, EventArgs e)
{
System.Threading.Thread.Sleep(5000);
BindData();
}
public void BindData()
{
// Here i am Binding data to the GridView.
}
Thanks,