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

N00b Tooltip Question

6 Answers 69 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 02 Mar 2009, 05:18 AM
This is probably a pretty straight-forward question. I'll keep it simple so it's (hopefully) quick to resolve.

I am using RadToolTipManager to output tooltips for RadSchedule appointments.

I have got RadToolTipManager1_AjaxUpdate to output a picture, so I've been able to do that much, however, I can't seem to grab the tooltip of the appointment.

This: e.TargetControlID.ToString();
Will output, for instance, this: ctl00_ContentPlaceHolder1_RadScheduler1_9_0

But, I want to be able to grab the control's tooltip.

I'm still having a little difficulty getting my head around the complexities of ASP.NET and Telerik controls. Any help with this syntax would be appreciated.

Thanks in advance for assistance. :)

 

6 Answers, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 05 Mar 2009, 08:33 AM
Hello David,

I am afraid I could not completely understand your scenario - would you please explain in more details what exactly you want to achieve? Do you need the tooltip control or only its content? Why you need to do this on the server and on what purpose? By using the e.TargetControlID.ToString(); syntax you actually extract the ID of the target control, do you need the target control itself or the tooltip? Once I have a better understanding on your scenario, I will do my best to provide you a proper advice.

Sincerely yours,
Svetlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
David
Top achievements
Rank 1
answered on 06 Mar 2009, 02:04 AM
Ok, I hope this will give a better mental picture.

I am using a radschedule. Right now, I have ten or so appointments on the radschedule. Each appointment has a subject (Exercise: Strength) and an AppointmentID (1, 2, 3, 4, etc). When you mouse over the appointment, a tool-tip pops out onto the screen thanks to RadToolTipManager (I love this).

Inside the Tooltip pop-out, I want to be able to grab the corresponding appointment's tool-tip text or, even better, the appointment's actual ID (the one being used in the database, not 3_3, 3_1, etc).

If I can grab either the tool-tip text or the actual appointment ID, I'm good to go.

Any help you can give would be awesome.
0
David
Top achievements
Rank 1
answered on 06 Mar 2009, 06:09 AM
Ok, we set up a test directory, so here is a working version:

http://www.mccsokinawa.com/dntestapps/

The pop-out tooltip will only work correctly the first time due to a Javascript error being caused by the MediaPlayer component, but I'll create another thread for that to keep this one simple.

Any help you can give would be awesome. Bonus points for telling me what might be wrong with that dag mediaplayer. :D
0
David
Top achievements
Rank 1
answered on 08 Mar 2009, 10:43 PM
I could still use some help with this. :)
0
David
Top achievements
Rank 1
answered on 10 Mar 2009, 12:31 AM
Forget it... This is how....

protected void RadToolTipManager1_AjaxUpdate(object sender, ToolTipUpdateEventArgs e)  
{  
 
     string toolTipID = e.Value; //this is how  
     HtmlGenericControl iframe1 = new HtmlGenericControl("iframe");  
     iframe1.Attributes["src"] = "ToolTipPopOut.aspx?ID=" + toolTipID;  
     e.UpdatePanel.ContentTemplateContainer.Controls.Add(iframe1);  
 

I knew this would have a simple answer. I apologize. I should have just said, "How do I get the appointment ID from inside a ToolTipManager ToolTip. Then the answer would be e.Value and not e.TargetControlID or anything else...
0
Svetlina Anati
Telerik team
answered on 10 Mar 2009, 08:28 AM
Hi David,

You are correct and you can use the value provided to the RadToolTipManager to pass a parameter - this approach is shown in many of our demos, e.g the following ones:

http://demos.telerik.com/aspnet-ajax-beta/tooltip/examples/tooltipmanager/defaultcs.aspx
http://demos.telerik.com/aspnet-ajax-beta/tooltip/examples/loadondemand/defaultcs.aspx
http://demos.telerik.com/aspnet-ajax-beta/tooltip/examples/targetcontrolsandajax/defaultcs.aspx

As to the problem with the media player, we debugged the provided page and we believe that the problem is not related to RadControls and RadToolTip. The issue occurs only under IE and it is not present under FF and it concerns some client code with a timer and this code has nothing to do with the RadToolTip's source code:

function(){this._timerCookie=window.setTimeout(this._tickTimerDelegate,200);var a=this.get_position();this._detectChapterChange(a);if(this._forceUpdate||this.get_currentState()==="Playing"){this._forceUpdate=false;this._ensurePosition(a)}}  
 

We assume that the problem can be reproduced without a RadToolTipManager control at all - just replace the tooltip with a standard update panel and test updating it few times in a row. After you reproduce the problem with the standard controls you should ask for support the vendors of those controls.

Kind regards,
Svetlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
ToolTip
Asked by
David
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
David
Top achievements
Rank 1
Share this question
or