OnAjaxUpdate not firing.

5 posts, 1 answers
  1. Stuart Hemming
    Stuart Hemming avatar
    1622 posts
    Member since:
    Jul 2004

    Posted 08 Nov 2010 Link to this post

    I've a page with a RadScheduler on it and I'm trying to get ToolTips working with the scheduler.

    I've got all the relevant code from this example but the tooltip manager isn't firing its OnAjaxUpdate event. For information, my RadToolTipManager definition is shown below.

    <telerik:RadToolTipManager runat="server"
                               ID="RadToolTipManager1"
                               Width="320"
                               Height="210"
                               Skin="Office2007"
                               Animation="None"
                               HideEvent="LeaveToolTip"
                               Text="Loading..."
                               RelativeTo="Element"
                               OnAjaxUpdate="RadToolTipManager1_AjaxUpdate"
                               OnClientBeforeShow="SchedulerToolTipBeforeShow"
                               EnableShadow="true"/>


    I know that the relevant controls are being added to the TargetControls collection, I can watch it happen in the debugger and I can see that the ID of the control added to the TargetControls collection is the same as the appointment that is rendered on the page.

    Putting a breakpoint in the server-side event handler fires nothing, but then I guess that that is because no Ajax request is ever made. I know this 'cos I added the alert call in to the following JS code from the page.
    Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(beginRequestHandler);
    function beginRequestHandler(sender, args) {
        alert("!");
        if (args.get_postBackElement().id.indexOf('RadScheduler1') != -1) {
            hideActiveToolTip();
        }
    }

    and I don't get the alert or my expected tooltip. All I get is the standard HTML tooltip.

    Is there a reason why the Ajax event wouldn't be called?

    -- 
    Stuart
  2. Stuart Hemming
    Stuart Hemming avatar
    1622 posts
    Member since:
    Jul 2004

    Posted 08 Nov 2010 Link to this post

    For the purposes of illustration, please see this Jing video. Note that the alert("!") you see is from that placed in the beginRequestHandler mentioned in my previous post.

    -- 
    Stuart
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Answer
    Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 11 Nov 2010 Link to this post

    Hi Stuart Hemming,

     Thank you for the provided video. As far as I understand and see, you have ajaxified your scheduler. Please, make sure that you have ajaxified the tooltip manager as well because otherwise, if the tooltip manager is not updated, no matter you add the targets to the TargetControls collection on the server, they will not be sent to the client and you will end up with an empty collection. Note, that this is how AJAX works - it updates only the controls in the ajaxified part of the page and if you manipulate others on the server they will not be updated.

    If this is not the case, please provide a sample, fully runnable reproduction demo and I will examine it and I will do my best to help.

    Kind regards,
    Svetlina
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  5. Stuart Hemming
    Stuart Hemming avatar
    1622 posts
    Member since:
    Jul 2004

    Posted 11 Nov 2010 Link to this post

    Svetlina,

    You are right of course. I discovered this for myself yesterday when I noticed that my tooltips appeared after I did a full postback.

    Thanks for confirming though.

    -- 
    Stuart
  6. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 11 Nov 2010 Link to this post

    Hi Stuart,

     I am glad I could help. In case you have any additional questions or problems, do not hesitate to contact me again, I will be happy to assist.

    Regards,
    Svetlina
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017