Posted: 11/14/2011
Hi,
I used 2 update panels, nested with each other1st update panel contains GridView12nd update panel contains GridView2. Gridview2 contains GridView3. But GridView3 just displays data. It has no rowcommand or any events.My problem is when a button in GridView2 is clicked. both GridView1 and GridView2's rowcommand event are fired. But, i do not want the GridView1's Rowcommand event to fire.
How do i achieve it. Please do help me asap.I set updatemode to conditional for both up1 & up2 -> did'nt work.I set updatemode to conditional, and childrenAsTriggers for both up1 & up2 -> did'nt work.I set updatemode to conditional for both up1 & up2 and defined the trigger for up1 alone -> did'nt workI set updatemode to conditional for both up1 & up2 and defined the trigger for up2 alone -> did'nt workI set updatemode to conditional for both up1 & up2 and defined the triggers for both -> did'nt work.------------------------------------------------------------------------------------------------
These are the triggers i tried 1) Inner update panel's trigger <Triggers> <asp:AsyncPostBackTrigger ControlID="GridView2" EventName="RowCommand" /> </Triggers> 2) Outer update panel's trigger <Triggers> <asp:AsyncPostBackTrigger ControlID="GridView1" EventName="RowCommand" /> </Triggers>------------------------------------------------------------------------------------------------
<asp:UpdatePanel ID="up1" runat="server" UpdateMode="Conditional"> <ContentTemplate> <asp:GridView ID="GridView1" .... OnRowCreated="GridView1_RowCreated" OnRowDataBound="GridView1_RowDataBound" OnRowCommand="GridView1_RowCommand">
.... ..
<td>
<asp:UpdatePanel ID="up2" runat="server" UpdateMode="Conditional"> <ContentTemplate> <asp:GridView ID="GridView2" .... OnRowCreated="GridView2_RowCreated" OnRowDataBound="GridView2_RowDataBound" OnRowCommand="GridView2_RowCommand">
<asp:GridView ID="GridView3" ....> </asp:GridView> </asp:GridView> </ContentTemplate> </asp:UpdatePanel>
</td>
.....
</asp:GridView>
</ContentTemplate></asp:UpdatePanel>
Please someone help
thanks in advance.