Delay when loading dynamically

5 posts, 0 answers
  1. Orest
    Orest avatar
    31 posts
    Member since:
    Apr 2009

    Posted 20 Jan 2010 Link to this post

    Guys,
    I have a tooltip manager and it work great. I have  list box with some link in the item template that are target controls. The problem that I’m having is that when I add radeditor to the page (I have 2 instances in my case) all the sudden when I hover over my target link I get 1-1.5 seconds delay. Even when I’m not loading  anything  (onAjaxUpdate handler has no code in it). Is there something I can do to stop this from happening?

    <telerik:RadToolTipManager runat="server" ID="radTTMgr" Position="BottomCenter" RelativeTo="Element" 
        Width="180px" Height="100px" Animation="None" HideEvent="LeaveToolTip"  ShowDelay="0"   
        ShowEvent="OnMouseOver" OnAjaxUpdate="OnAjaxUpdate" Skin="SomeCustom"   
        EnableEmbeddedSkins="false">  
    </telerik:RadToolTipManager> 

    Thank you.
  2. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 25 Jan 2010 Link to this post

    Hi Orest,

    We were able to reproduce the problem you report but we will need some additional time to examine it and we will write back to you as soon as we have some additional useful information.

    Thank you in advance for your patience and understanding!

    Sincerely yours,
    Svetlina
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 26 Jan 2010 Link to this post

    Hello Orest,

    We examined the setup further and we found the reason for the behavior. It is , however, related to how the things work and not an integration bug.

    An asynchronous postback behaves much like a synchronous postback. All the server page life-cycle events occur, and view state and form data are preserved. However, in the rendering phase, only the contents of the update panel control are sent to the browser. The rest of the page remains unchanged - you can find this information and more details below:

    http://msdn.microsoft.com/en-us/library/bb386573.aspx

     That is why no matter you use AJAX to load the content of the tooltip, the server events gets fired and the editor control performs some operations at these events which cause the small delay.

    This being said, this is a result of the way AJAX works. That is why what we can suggest is not to use AJAX for this case but to load the content on demand by using a WebService - this should fix the delay problem.

    A sample online demo about using a WebService to populate content in the tooltip is available below:

    http://demos.telerik.com/aspnet-ajax/tooltip/examples/webservice/defaultcs.aspx

    Kind regards,
    Svetlina
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  5. Orest
    Orest avatar
    31 posts
    Member since:
    Apr 2009

    Posted 29 Jan 2010 Link to this post

    I understand how ajax works but I guess my question whey if I have radeditor delay happens but if I have any other controls it doesn’t.

    I'm afraid Webservice approach will not work for me (or maybe I need some help to make it work) because a control that is loaded on demand has some functionality similar to (http://demos.telerik.com/aspnet-ajax/tooltip/examples/loadondemand/defaultcs.aspx).

     

    Also I’m firing some events from control in tooltip that are handled by code on the page and it seem like I can not do with webservice

  6. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 01 Feb 2010 Link to this post

    Hello Orest,

    The observed behavior does not occur only with RadEditor - it is caused by the page lifecycle and the code which should be executed. You can for example reproduce with a standard GridView with many records. You can even reproduce it with a standard ASP update panel  - please test the following code which does not contain any RadControls and see the difference with and without the grid view:

     

    <form id="form1" runat="server">
        <asp:ScriptManager ID="mng" runat="server">
        </asp:ScriptManager>
        <script type="text/C#" runat="server">
      
            protected System.Data.DataTable GetData()
            {
                System.Data.DataTable tbl = new System.Data.DataTable();
                tbl.Columns.Add(new System.Data.DataColumn("FirstColumn"));
                tbl.Columns.Add(new System.Data.DataColumn("SecondColumn"));
                tbl.Columns.Add(new System.Data.DataColumn("ThirdColumn"));
                tbl.Columns.Add(new System.Data.DataColumn("FourthColumn"));
                for (int i = 0; i < 1000; i++)
                {
                    tbl.Rows.Add(new object[] { "firstRecord1", "firstRecord2", "firstRecord3", "firstRecord4" });
                    tbl.Rows.Add(new object[] { "secondRecord1", "secondRecord2", "secondRecord3", "secondRecord4" });
                    tbl.Rows.Add(new object[] { "thirdRecord1", "thirdRecord2", "thirdRecord3", "thirdRecord4" });
                }
                return tbl;
            }
            protected void Page_Load(object sender, EventArgs e)
            {
                grd.DataSource = GetData();
                grd.DataBind();
            }
            protected void OnClick(object sender, EventArgs e)
            {
                lbl.Text="End request";
            }
      
        </script>
        <asp:HyperLink ID="target" runat="server" Text="Show ToolTip"></asp:HyperLink>
        <asp:UpdatePanel ID="ipPanel" runat="server">
            <ContentTemplate>
                <asp:Label ID="lbl" runat="server" Text="Start request"></asp:Label>
                <asp:Button ID="btn" runat="server" Text="Test" OnClick="OnClick" />
            </ContentTemplate>
        </asp:UpdatePanel>
        <asp:GridView ID="grd" runat="server">
        </asp:GridView>
    </form>

    As you see, the delay is much bigger during to the load of the page and as you know RadEditor is a very complex control and since this is the reason, there is nothing which can be done except for using a WebService.

    Sincerely yours,
    Svetlina
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017