0 Replies - 3840 Views - Last Post: 15 November 2011 - 07:18 AM

#1 dhanlak   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 15-November 11

nested update panel

Posted 15 November 2011 - 07:18 AM

Hi,



I used 2 update panels, nested with each other
1st update panel contains GridView1
2nd 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 work
I set updatemode to conditional for both up1 & up2 and defined the trigger for up2 alone -> did'nt work
I 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>




Can it be done using UpdatePanel. Or is there any alternative. Please give your suggestions


thanks in advance.

Is This A Good Question/Topic? 0
  • +

Page 1 of 1