This is a migrated thread and some comments may be shown as answers.

OnAjaxUpdate not firing.

4 Answers 131 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Stuart Hemming
Top achievements
Rank 2
Stuart Hemming asked on 08 Nov 2010, 05:07 PM
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

4 Answers, 1 is accepted

Sort by
0
Stuart Hemming
Top achievements
Rank 2
answered on 08 Nov 2010, 05:38 PM
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
0
Accepted
Svetlina Anati
Telerik team
answered on 11 Nov 2010, 01:48 PM
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
0
Stuart Hemming
Top achievements
Rank 2
answered on 11 Nov 2010, 02:34 PM
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
0
Svetlina Anati
Telerik team
answered on 11 Nov 2010, 02:57 PM
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
Tags
ToolTip
Asked by
Stuart Hemming
Top achievements
Rank 2
Answers by
Stuart Hemming
Top achievements
Rank 2
Svetlina Anati
Telerik team
Share this question
or