UpdatePanel and Coolite Controls

  1. #1

    UpdatePanel and Coolite Controls



    Hello,


    Coolite controls placed inside an updatepanel disappear when the panel is updated unless the control triggering the update is listed as an AsyncPostBackTrigger in the trigger section of the updatepanel.

    Is this a bug? Currently the control that triggers the updatepanel update is part of another updatepanel and adding it to the list of triggers in the panel that gets updated would require a lot of changes throughout my application. Is there a way to make coolite controls work in the same way regular asp controls work? Thanks.
  2. #2

    RE: UpdatePanel and Coolite Controls

    Can you make a simplified .aspx code sample demonstrating how to reproduce this scenario? Please demonstrate how are you triggering the update of one Panel from a control in another. Are you manually calling .update on the UpdatePanel client-side?

    Geoffrey McGill
    Founder
  3. #3

    RE: UpdatePanel and Coolite Controls

    Thank you for replying. Here is a simplied example:

    In ASPX Page Code:

    <asp:UpdatePanel runat="server" id="UP1" UpdateMode="Conditional">
    <ContentTemplate>
        <asp:LinkButton runat="server" ID="LB1" Text="Click" />
    </ContentTemplate>
    </asp:UpdatePanel>
    <br /><br /> 
    <asp:UpdatePanel runat="server" id="UP2" UpdateMode="Conditional">
    <ContentTemplate>
        <ext:DateField runat="server" />
    </ContentTemplate>
    </asp:UpdatePanel>
    In ASPX.CS Page Code:

    
    override protected void OnInit(EventArgs e)
    {
        LB1.Click += new EventHandler(LB1_Click);
    
        base.OnInit(e);
    }
    
    
    void LB1_Click(object sender, EventArgs e)
    {
        UP2.Update();
    }
    When UP2 is updated, the datefield control disappears.

    Thank you
    Last edited by geoffrey.mcgill; Feb 04, 2015 at 3:10 AM.
  4. #4

    RE: UpdatePanel and Coolite Controls

    Hi erey,

    Try using the following revised LB1_Click handler which calls .AddUpdatePanelToRefresh

    Example

    void LB1_Click(object sender, EventArgs e)
    {
        UP2.Update();
        this.ScriptManager1.AddUpdatePanelToRefresh(this.UP2);
    }
    The "ScriptManager1" is an <ext:ScriptManager> control.

    Please see the following forum post for more information and history of why the .AddUpdatePanelToRefresh is required.

    http://forums.ext.net/showthread.php...-2.aspx#bm2227

    Hope this helps.

    Geoffrey McGill
    Founder
  5. #5

    RE: UpdatePanel and Coolite Controls

    Thank you Geoffrey.
  6. #6

    RE: UpdatePanel and Coolite Controls

    That worked for the simple scenario shown above.

    Do you guys plan to continue working on this issue so that coolite controls within updatepanels behave in the same way asp controls do? I have web controls with nested updatepanels and this fix does not seem to work in every case.

    Thanks
  7. #7

    RE: UpdatePanel and Coolite Controls

    There is no further work planned for UpdatePanel support. I believe the thread linked to above explains the limitations of the UpdatePanel.

    That said, if you have a scenario which is not working, please feel free to post a full .aspx code sample demonstrating how to reproduce the issue and we'll do our best to debug and figure out why it's not working.


    Geoffrey McGill
    Founder

Similar Threads

  1. Replies: 8
    Last Post: Nov 17, 2009, 10:16 AM
  2. Replies: 0
    Last Post: Sep 22, 2009, 3:52 PM
  3. UpdatePanel and coolite control problem
    By omeriko9 in forum 1.x Help
    Replies: 10
    Last Post: Jun 02, 2009, 7:00 AM
  4. Updatepanel and the disappearing controls
    By DasPhansom in forum 1.x Help
    Replies: 1
    Last Post: Feb 04, 2009, 4:21 AM
  5. UpdatePanel with Coolite 0.6
    By tas in forum 1.x Help
    Replies: 3
    Last Post: Dec 16, 2008, 7:43 PM

Posting Permissions