none
How to show updateProgess with postback trigger on button inside grideview RRS feed

  • Question

  • I am trying to create files on server on button click and same time i am downloading those files on client machine while the process is sucessfull but while the process is going on I am not able to show updateProgess or loader on the screen. I have kept the updatePanel with updateProgess on master page and in the content page there's a gridview with a linkbutton in the header which generates files and download it. The only problem i am facing is i am not to show progess bar is there any way i could do it.

    This is my master page:

    <div class="container-fluid" id="body">
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                <asp:ContentPlaceHolder ID="BodyContentPlaceHolder" runat="server">
                </asp:ContentPlaceHolder>
            </ContentTemplate>
            <Triggers>
                <asp:AsyncPostBackTrigger ControlID="menuBar" />
                <asp:AsyncPostBackTrigger ControlID="MenuCategories" />
            </Triggers>
        </asp:UpdatePanel>
    
        <asp:UpdateProgress ID="progress" runat="server" DynamicLayout="true" DisplayAfter="0">
            <ProgressTemplate>
                <div class="ui-widget-overlay">
                    <div id="dvLoading">
                    </div>
                </div>
            </ProgressTemplate>
        </asp:UpdateProgress>
    </div>

    And this is my content page:

    <div>
        <cc1:TabContainer ID="TabContainer3" runat="server" ActiveTabIndex="0" AutoPostBack="true" CssClass="AspTabContainer">
            <cc1:TabPanel ID="TabPanel6" runat="server" HeaderText="Transaction">
                <ContentTemplate>
                    <div id="Div1" runat="server" style="width: 2000px">
                        <asp:GridView ID="GridView1" runat="server"
                            AutoGenerateColumns="False"
                            AllowSorting="False" AllowPaging="false" PageSize="7"
                            CssClass="table table-responsive table-bordered table-hover AspGridview">
                            <PagerStyle CssClass="pagination" />
                            <Columns>
                                <asp:TemplateField HeaderText="Select Code">
                                    <HeaderTemplate>
                                        <asp:CheckBox ID="SelectAllCode" runat="server" OnCheckedChanged="SelectAllCode_CheckedChanged" AutoPostBack="true" />
                                    </HeaderTemplate>
                                    <ItemTemplate>
                                        <asp:CheckBox ID="SelectCode" runat="server" OnCheckedChanged="SelectCode_CheckedChanged" AutoPostBack="true" />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Actions">
                                    <ItemTemplate>
                                        <asp:LinkButton ID="LnkViewButton" runat="server" Font-Underline="true" Enabled="false" OnClick="LnkViewButton_Click" CssClass="editbutton">View</asp:LinkButton>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Actions" HeaderStyle-Width="120px">
                                    <HeaderTemplate>
                                        <asp:LinkButton ID="LnkGenerateAllButton" BackColor="#ffffff" ForeColor="#000000" runat="server" Font-Underline="true"
                                            Enabled="false" OnClick="LnkGenerateAllButton_Click" CssClass="editbutton">Generate All</asp:LinkButton>
                                    </HeaderTemplate>
                                    <ItemTemplate>
                                        <asp:LinkButton ID="LnkGenerateButton" runat="server" Font-Underline="true" Enabled="false"
                                            OnClick="LnkGenerateButton_Click" CssClass="editbutton">Generate</asp:LinkButton>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="CHARGE_CODE" SortExpression="CHARGE_CODE" HeaderText="Charge Code"></asp:BoundField>
                                <asp:BoundField DataField="PRO_CLIENT_FLAG" SortExpression="PRO_CLIENT_FLAG" HeaderText="Pro Client Flag"></asp:BoundField>
                                <asp:BoundField DataField="CHARGE_NAME" SortExpression="CHARGE_NAME" HeaderText="Charge Name"></asp:BoundField>
                                <asp:BoundField DataField="DEPT_NAME" SortExpression="Dept_NAME" HeaderText="Department Name"></asp:BoundField>
                                <asp:BoundField DataField="PROCESSED_BY" SortExpression="PROCESSED_BY" HeaderText="Processed By"></asp:BoundField>
                                <asp:BoundField DataField="PROCESSED_DATE" SortExpression="PROCESSED_DATE" HeaderText="Processed Date"></asp:BoundField>
                            </Columns>
                            <HeaderStyle BackColor="#0089d0" ForeColor="White" HorizontalAlign="Left" />
                            <PagerStyle BackColor="#0089d0" Font-Bold="true" ForeColor="White" />
                            <EmptyDataTemplate>No Record Found</EmptyDataTemplate>
                            <EditRowStyle BackColor="#c0e6fa" />
                        </asp:GridView>
                    </div>
                </ContentTemplate>
            </cc1:TabPanel>
        </cc1:TabContainer>
    </div>

    Code behind (Content Page):

    LinkButton lnkheader = (LinkButton)GrdChargeCodeProcessing.HeaderRow.FindControl("LnkGenerateAllButton");
    ScriptManager.GetCurrent(this).RegisterPostBackControl(lnkheader);

    Thankyou for your help.

    • Moved by Stanly Fan Friday, August 4, 2017 12:51 AM from windows form
    Wednesday, August 2, 2017 7:22 AM

All replies

  • Hi,

    According to your description, your issue is more related about ASP.NET, maybe is it a WebForm app? And this forum is discussing and asking questions about the Windows Form and ClickOnce, it will be more appropriate to ask your question at ASP.NET Forum.

    Thank you for your understanding.

    Best Regards,

    Stanly


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, August 3, 2017 6:50 AM
  • Well thank you for letting me know but i was expecting an answer to this but i think you don't know and just want to increase your points by writing this bullshit
    Thursday, August 3, 2017 11:21 AM