Hi,
I have a Gridview with UpdateProgress, UpdatePanel and Linkbutton in gridview row TemplateField. When I click the Linkbutton, the UpdateProgress should work, but not in my case.
Here's the code:
<asp:GridView ID="GridView1" runat="server" AllowPaging="True"
AutoGenerateColumns="False" BackColor="White" BorderColor="#CC9966"
BorderStyle="None" BorderWidth="1px" CellPadding="4" DataKeyNames="CustomerID"
onpageindexchanging="GridView1_PageIndexChanging" Width="500px"
onrowcommand="GridView1_RowCommand"
onrowdatabound="GridView1_RowDataBound"><Columns><asp:BoundField DataField="CustomerID" HeaderText="Customer ID" /><asp:BoundField DataField="CompanyName" HeaderText="Company" /><asp:BoundField DataField="City" HeaderText="City" /><asp:TemplateField><ItemTemplate><asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanel2" ><ProgressTemplate><asp:Image ID="Image1" runat="server" ImageUrl="~/images/ajax-loader.gif" /></ProgressTemplate></asp:UpdateProgress><asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode= "Conditional" ><ContentTemplate><asp:LinkButton ID="lbtnExecute" runat="server" CommandArgument="<%# ((System.Web.UI.WebControls.GridViewRow)(Container)).DataItemIndex + 1 %>"
CommandName="Execute">Execute</asp:LinkButton></ContentTemplate><Triggers><asp:AsyncPostBackTrigger ControlID="lbtnExecute" EventName="Click" /></Triggers></asp:UpdatePanel></ItemTemplate></asp:TemplateField></Columns><FooterStyle BackColor="#FFFFCC" ForeColor="#330099" /><HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="#FFFFCC" /><PagerStyle BackColor="#FFFFCC" ForeColor="#330099" HorizontalAlign="Center" /><RowStyle BackColor="White" ForeColor="#330099" /><SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="#663399" /><SortedAscendingCellStyle BackColor="#FEFCEB" /><SortedAscendingHeaderStyle BackColor="#AF0101" /><SortedDescendingCellStyle BackColor="#F6F0C0" /><SortedDescendingHeaderStyle BackColor="#7E0000" /></asp:GridView>
I tried removing the:
AssociatedUpdatePanelID="UpdatePanel2"
but UpdateProgress showed in all rows. I want it to show only on the row where I click the Linkbutton.
Can anyone help?