Infragistics Home

Infragistics Forums

Infragistics community online discussions.
Welcome to Infragistics Forums Sign in | FAQ
in Search

WebSplitter and UpdatePanel

Last post 07-22-2008 18:33 by cantrellr. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 07-18-2008 14:22

    • cantrellr
    • Not Ranked
    • Joined on 07-01-2008
    • Los Angeles
    • Points 165

    WebSplitter and UpdatePanel

    I have a WebSplitter with two panes (left and right).  In the right pane, is an UpdatePanel that wraps a grid control.  There are a few buttons in the left pane.  I am finding that, when using a WebSplitter, I cannot set the UpdatePanel triggers collection in the client side markup.  Normally, I would do something like this:

     <cc1:SplitterPane runat="server" Size="75%" enableRelativeLayout="true" style="position:relative" >

    <Template>

    <asp:UpdatePanel ID="updPanelView" runat="server" RenderMode="Inline">

    <ContentTemplate>

    <div id="divView" runat="server" style="height: 100%; width: 100%; vertical-align: top;"

    align="left">

    <uc1:View ID="View" runat="server" />

    </div>

    </ContentTemplate>

    <Triggers>

    <asp:AsyncPostBackTrigger ControlID="cmdGo" EventName="Click" />

    <asp:AsyncPostBackTrigger ControlID="igTree" EventName="NodeClicked" />

    </Triggers>

    </asp:UpdatePanel>

    </Template>

    </cc1:SplitterPane>

     But, if I add the Triggers collection, I get the following error message:

    A control with ID 'cmdGo' could not be found for the trigger in UpdatePanel 'updPanelView'

    So, instead, I remove the Triggers collection and add them in the code-behind Page_Load, like this:

    Dim trigger As New System.Web.UI.AsyncPostBackTrigger

    trigger.EventName = "Click"

    trigger.ControlID = Me.cmdGo.UniqueID.ToString

    Me.updPanelView.Triggers.Add(trigger)

    trigger = New System.Web.UI.AsyncPostBackTrigger

    trigger.EventName = "NodeClicked"

    trigger.ControlID = Me.igTree.UniqueID.ToString

    Me.updPanelView.Triggers.Add(trigger)

    That gets past the first error.  But, it only works every other event.  In other words, the first time I hit the cmdGo button, the async postback works properly.  The next time, I get a full page postback, then the next an async postback.  And, so it goes. 

    Anyone experience similar problems?  Solutions?

     Thanks

    • Post Points: 20
  • 07-19-2008 19:42 In reply to

    Re: WebSplitter and UpdatePanel

    Hello,

    Thanks for writing. I believe both issues you report might be the expected behaviour

    1)  Anything inside a Template (INamingContainer) cannot be accessed outside the template. I guess, if you try the same setup with any templated control you will get the same problem - declaratively you will not be able to set triggers. So your approach with code is I believe the correct way.

    2) The second problem is I believe related to events/life-cycle of the ASP.NET page. Typically, events are setup in the OnInit event of the page (this is what VS.NET does under the hood when you use the designer) - and this might be related to the problem you are getting since Page_Load is called much later in the cycle.

    So one thing I can suggest is moving your code initializing the UpdatePanel triggers to OnInit - this may address the problem.

    Please, let me know if this works. 

    Best Regards,
    Rumen Stankov (MCSD.NET)
    The Infragistics ASP.NET Team
    • Post Points: 20
  • 07-22-2008 18:33 In reply to

    • cantrellr
    • Not Ranked
    • Joined on 07-01-2008
    • Los Angeles
    • Points 165

    Re: WebSplitter and UpdatePanel

    Thank you Rumen, that appears to have solved the problem.

    • Post Points: 5
Page 1 of 1 (3 items)
Powered by Community Server (Commercial Edition), by Telligent Systems