views:

30

answers:

1

I have a grid. Inside the grid I have a button which is placed inside an update panel, which when clicked should do something I tell it to do in code behind. The problem is that when I click the button, it ignores the fact that the button is inside the update panel and it refreshes the entire grid, instead of refreshing only the stuff inside the update panel. What I need it to do instead is update only things inside the update panel my button is in, but leave alone the grid... Help anyone?

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>
A: 

If the Grid is inside of another update panel you may want to make sure ChildrenAsTriggers is set to false.

Mike
Unfortunately adding ChildrenAsTriggers didn't fix the problem
Victor F
Maybe try setting the parent updatepanels updatemode to conditional if it isn't already too and leave ChildrenAsTriggers false
Mike
Updatemode is already set to conditional and adding the ChildrenAsTriggers as false doesn't change anything... but thanks anyway
Victor F