UpdatePanel inside ItemTemplate updates the entire grid

I have a grid. Inside the grid, I have a button that fits inside the update panel, which when clicked should do something that I say to do it in code. The problem is that when I click the button, it ignores the fact that the button is inside the update panel, and it updates the entire grid, instead of updating only the contents inside the update panel. Instead, I need to update only those things that are inside the update panel, which includes my button, but leave the grid alone ... Help someone?

This is the setup I currently have:

<asp:GridView ID="grv_FieldDesc" EnableViewState="True" runat="server" DataSourceID="ObjectDataSource1" 
                                    OnPreRender="grv_FieldDesc_PreRender">
    <asp:TemplateField HeaderText="Hidden">
        <EditItemTemplate>
            <asp:UpdatePanel ID="updp_grids_formula" runat="server" UpdateMode="Conditional">
                <ContentTemplate>
                    <asp:LinkButton ID="Button1" runat="server" OnClick ="Button1_Click">LinkButton</asp:LinkButton >
                </ContentTemplate> 
            </asp:UpdatePanel> 
        </EditItemTemplate>
    </asp:TemplateField>
</asp:GridView>
+3
source share
1 answer

, , ChildrenAsTriggers false.

0

Source: https://habr.com/ru/post/1751473/


All Articles