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

RadToolTipManager Update target control

3 Answers 162 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Duy
Top achievements
Rank 1
Duy asked on 08 Oct 2009, 05:18 AM
Hi,

I have a problem on displaying the target control that retains the first selected information.

Here my codes.

 

protected void RadToolTipManager1_AjaxUpdate(object sender, Telerik.Web.UI.ToolTipUpdateEventArgs e)

 

{

 

Control ctrl = Page.LoadControl("~/UserControls/PersonalDetails.ascx");

 

e.UpdatePanel.ContentTemplateContainer.Controls.Add(ctrl);

 

PersonalDetails oPersonalDetails = (PersonalDetails)ctrl;

 

oPersonalDetails.Initial(

int.Parse(e.Value), 0, "", false);

 

}

 

protected void RGGP_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)

 

{

BaseClass.

PeopleCareTeam oPeopleCareTeam = (BaseClass.PeopleCareTeam)e.Item.DataItem;

 

 

if (e.Item.ItemType == Telerik.Web.UI.GridItemType.AlternatingItem || e.Item.ItemType == Telerik.Web.UI.GridItemType.Item)

 

{

RadToolTipManager1.TargetControls.Add(e.Item.ClientID, oPeopleCareTeam.LinkedPeopleID.ToString(),

true);

 

}

}

What shall I do to get refresh target control?

Regards,

Duy

3 Answers, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 12 Oct 2009, 01:19 PM
Hi Duy ,

I am afraid I could not completely understand when exactly and why you want to refresh the target control. Would you please provide more detailed explanations of the exact scenario you want to achieve? The code you have provided shows how you attach tooltips to target and how you put content in the tooltip but I could not understand where you try to update the targets.

Once I have a better understanding on your exact goal, I will do my best to help!

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.
0
Duy
Top achievements
Rank 1
answered on 12 Oct 2009, 10:38 PM

Hi Svetlina,

 

When the mouseover an item obviously I would like to update the content of the tool tip regarding to that item.  Currently, the tool tip content keeps retaining the first item.

Regards,

Duy

0
Svetlina Anati
Telerik team
answered on 15 Oct 2009, 02:39 PM
Hello Duy ,

In  your previous post you said "What shall I do to get refresh target control?" and this made me unsure about your exact requirement - now you are explaining that you actually want to refresh the tooltip's content and not the target control itself.

The provided code is not enough to fully understand the reason for the problem but I prepared for you a few assumptions:

1) Make sure that you load the information in the user control every time when you load it - e.g if you have a databound control,, make sure that you call its DataBind() method everytime and not only on first load.

2) In case you update the target thorugh AJAX make sure that you also update the RadToolTipManager at the same time - a sample demo is available below:

http://demos.telerik.com/aspnet-ajax/tooltip/examples/targetcontrolsandajax/defaultcs.aspx
You can test this assumption by disabling AJAX for teh test and see whether the issue disappears when a plain postback is used.

If my assumptions do not help, I will really need to examine a sample, fully runnable reproduction demo. Please, prepare such (use Northwind or a fake programmatic datasource when needed) and upload it somewhere in the net - after that just provide a download url and reproduction instructions and I will examine and debug it locally and I will help you resolve the problem. Note, also that the demo you upload should not contain the Telerik.Web.UI.dll - just confirm the version you are actually using. Once I have a better understanding on your exact case, I will do my best to help.


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.
Tags
ToolTip
Asked by
Duy
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
Duy
Top achievements
Rank 1
Share this question
or