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

LoadOnDemand ToolTipUpdateEventArgs as an object???

1 Answer 72 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Mike
Top achievements
Rank 1
Mike asked on 09 Feb 2009, 07:59 PM
Sorry for the cryptic thread name but i am not sure exactly what to call this...

Currently i use TooltipManagers that load user control OnDemand. I pass the control a parameter and the control then uses this parameter to retrieve data OnAjaxUpdate.

Now i have a slightly different senario. The data i want the tooltip to display is available on the page where the TooltipManager sits. The control i want to load in the tooltip does not have to retrieve any data.

That said the ToolTipUpdateEventArgs being a string value is very limiting in this senario... I would like to pass the control an entire XML node to display the data...

So here is the questions...

1) case ToolTipUpdateEventArgs be anything other than a string?
2) is this the correct way of doing this. i want to dynamically add a control to the tooltip[ to load OnDemand but i want to pass it all the data it needs. So i guess the question is is there a way to dynamically build a tooltip without using a control to load into it?

Sorry this question is a little bit confusing, but maybe someone understand what i am getting at or at least it will open up discussion and i can explain further.

Duncan

1 Answer, 1 is accepted

Sort by
0
Tervel
Telerik team
answered on 12 Feb 2009, 02:54 PM
Hi Duncan,

I was not able to completely grasp your scenario, but it seems to me that you consider the tooltip to be both a container and a presenter of data. In fact, the tooltip itself is just the container - which can be shown, hidden, positioned, etc. All the content/data that is displayed inside is the responsibility of the developer-written code.

What the tooltip manager provides you as "extra" is the ability to pass a KEY (string) that will help you determine what kind of data should be loaded into any user control inside the tooltip.

My impression is that you expect that providing the tooltip itself with some data will "suggest" the tooltip how to actually use this data. This is not the case, as the tooltip itself is little but a container.

Since you also seem to have all the data on the page itself, and you do not seem to need any round trip to the server, you might consider the following example:
http://demos.telerik.com/aspnet-ajax/tooltip/examples/clientsideapi/defaultcs.aspx

Among other things it shows how to set a content element of the tooltip programmatically on the client-side using code such as

var tooltip = $find("RadToolTip1");
tooltip.set_ContentElement(contentElement);//contentElement is some HTML node


Sincerely yours,
Tervel
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
Mike
Top achievements
Rank 1
Answers by
Tervel
Telerik team
Share this question
or