[英]ASP.net Gridview Autoupdate
我有如下所示的gridview。
<asp:GridView ID="grdPrintData" runat="server" AutoGenerateColumns="False" CssClass="GridViewStyle"
Width="100%">
<AlternatingRowStyle BackColor="#B6C4DE"></AlternatingRowStyle>
<Columns>
<asp:BoundField DataField="S No" HeaderText="S No" SortExpression="S No">
<ItemStyle HorizontalAlign="Center" />
</asp:BoundField>
<asp:BoundField DataField="Object ID" HeaderText="Object ID" SortExpression="Object ID">
<ItemStyle HorizontalAlign="Center" />
</asp:BoundField>
<asp:BoundField DataField="Object Description" HeaderText="Object Description" SortExpression="Object Description">
<ItemStyle HorizontalAlign="Center" />
</asp:BoundField>
<asp:BoundField DataField="Print Count" HeaderText="Print Count" SortExpression="Print Count">
<ItemStyle HorizontalAlign="Center" />
</asp:BoundField>
<asp:TemplateField Visible="false">
<ItemTemplate>
<asp:Image ID="Image1" runat="server" ImageUrl="~/images/loading-gif-transparent-10.gif" Height="15px" Width="30px" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
<HeaderStyle CssClass="HeaderStyle" />
<FooterStyle CssClass="FooterStyle" />
<RowStyle CssClass="RowStyle" />
<AlternatingRowStyle CssClass="AlternatingRowStyle" />
<PagerStyle CssClass="PagerStyle" />
</asp:GridView>
此gridview在UpdatPanel內部。
<asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanel1">
<ProgressTemplate>
<div style="position: fixed; text-align: center; height: 100%; width: 100%; top: 0; right: 0; left: 0; z-index: 9999999; background-color: black; opacity: 9.5;">
<asp:Image ID="imgUpdateProgress" runat="server" ImageUrl="~/images/loader.gif" AlternateText="Loading ..." ToolTip="Loading ..." Style="padding: 5px; position: fixed; top: 35%; left: 43%;" BackColor="Black" />
<asp:Label runat="server" Text="Trying to connecto to printer...Please Wait..." ID="lblLoadMessage" Style="padding: 10px; position: fixed; top: 33%; left: 43%;" Font-Bold="true" Font-Size="Larger"></asp:Label>
</div>
</ProgressTemplate>
</asp:UpdateProgress>
觸發每個打印命令並完成打印后,如何在下面的標簽中更改圖像。
<asp:Image ID="Image1" runat="server" ImageUrl="~/images/loading-gif-transparent-10.gif" Height="15px" Width="30px" />
就像,最后一個網格視圖列顯示加載符號,一旦打印了該特定行,就必須將圖像更改為完成。
您可以在此處使用兩個按鈕,如果打印成功,則將“ visible false”設置為第一個按鈕,將true設置為第二個按鈕。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.