I am using 2 radtooltipmanager controls on my page, I have a grid, in which I am displaying employee ID and employee address, I have tool tip for both, 1 tooltipmanager for employeeId and another for employee address.
Problem: both tooltips come fine if I hover over then alternately. Means, if I am hovering over employeeID it will show me that employees detail and if I hover over the address it will show me the address details. but now if I again hover over any other address, it caches the one which I hovered before it. Now, if I hover over the employee ID and then hover back over to the address, it will show me proper details. same problem on employeeID side, if I keep on hovering over the different employeeID it will show me details of the first one which I hovered.
If I view them alternately it works fine.
Can you please let me know what is wrong?
Thank you,
Jay Mehta.
9 Answers, 1 is accepted
I built up a test demo based on your explanations but unfortunately to no avail - each tooltip shows the expected information. Would you please examine teh attached test demo and let me knwo what steps should I follow to reproduce the issue? In case you cannot replicate the problem with teh attached code, modify it in order to demonstrate the issue and paste the fully runnable source code along with detailed reproduction setps and I will build a sample which I can debug locally and 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.
Help!
I am not completely sure how exactly you populate the order details grid but I assume that a possible reason for the problem could be that you are populating the details grid with AJAX and you do not update the tooltip manager at the same time. Please, examine whether my assumption is correct and if so, make sure that you update the tooltip manager when needed.
In case this is not the problem, I will really need to examine your particular setup - please prepare a sample, fully runnable reproduction demo (use a fake programmatic datasource for the grids or Northwind), open a new support ticket and send it to me along with very detailed reproduction steps and explanations of the actual and the desired result and I will help you achieve what you need.
Best wishes,
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.
Thanks for your response! I've set the EnablePostBackOnRowClick property to true on the Orders grid. When a user clicks on a row in the Orders grid, in the ItemCommand event (if the commandname is RowClicked) I load the Order Details grid by Order ID. I am using the RadAjaxManager and I do have an AjaxSetting this is tying the Orders grid to the Order Details grid. That said, I am adding the control I want to be "tooltipified" to the ToolTipManager's TargetControls collection in the Order Details OnItemDataBound event....is this the wrong place?
I think that this event is the correct one to populate the RadToolTipManager's TargetControls collection. However, what I assume that is the problem is that you do not update the tooltip manager in the RadAjaxManager's AjaxSettings at that time. Try to set the OrderDetails grid to update the tooltip manager in the RadAjaxManager's markup settings and test again because otherwise if you debug the server code, the target controls will be populated but the updated tooltip manager will not be sent to the browser.
Best wishes,
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.
I know it's been awhile, but what event should I update the ToolTipManager control from? I've tried from onitemcreated and onitemdatabound and it is still not working. Thanks!!
To correctly configure a tooltipified grid you should fulfil the following:
1) The new values in the user control's content controls should be set in the user control's PreRender event.
2) The targets should be added to the RadToolTipManager's TargetControls collection in the grid's OnItemDataBound event.
3) The TargetControls collection should be cleared when the grid is paged and sorted.
4) If you have ajaxified the grid, you should add the tooltip manager to the same settings - e.g put the manager in the same update panel or add it to the same ajax settings of ajax manager where the grid is added.
A sample demo is available below:
http://demos.telerik.com/aspnet-ajax/tooltip/examples/targetcontrolsandajax/defaultcs.aspx
Svetlina
the Telerik team
I have a very similar problem.
Different to my job to run Usercontrol.
To be a problem when Usercontrol have Textbox or Button.
While the switch click to display the tooltip.
<
telerik:RadToolTipManager
ID
=
"RadToolTipManager1"
OffsetY
=
"-1"
HideEvent
=
"ManualClose"
Width
=
"700px"
Height
=
"350px"
runat
=
"server"
ShowEvent
=
"OnClick"
EnableShadow
=
"true"
OnAjaxUpdate
=
"OnAjaxUpdate"
RelativeTo
=
"Element"
Position
=
"MiddleRight"
>
</
telerik:RadToolTipManager
>
<
telerik:RadToolTipManager
ID
=
"RadToolTipManager2"
OffsetY
=
"-1"
HideEvent
=
"ManualClose"
Width
=
"500px"
Height
=
"250px"
runat
=
"server"
ShowEvent
=
"OnClick"
EnableShadow
=
"true"
OnAjaxUpdate
=
"OnAjaxUpdate2"
RelativeTo
=
"Element"
Position
=
"MiddleRight"
>
</
telerik:RadToolTipManager
>
protected
void
OnAjaxUpdate(
object
sender, ToolTipUpdateEventArgs args)
{
this
.UpdateToolTipSta(args.Value, args.UpdatePanel);
}
protected
void
OnAjaxUpdate2(
object
sender, ToolTipUpdateEventArgs args)
{
this
.UpdateToolTipFile(args.Value, args.UpdatePanel);
}
private
void
UpdateToolTipSta(
string
elementID, UpdatePanel panel)
{
Control ctrl = Page.LoadControl(
"../../UserControl/View/aaa.ascx"
);
panel.ContentTemplateContainer.Controls.Add(ctrl);
aaa view = (aaa)ctrl;
view.TaskID = elementID;
}
private
void
UpdateToolTipFile(
string
elementID, UpdatePanel panel)
{
Control ctrl = Page.LoadControl(
"../../UserControl/View/bbb.ascx"
);
panel.ContentTemplateContainer.Controls.Add(ctrl);
bbb view = (bbb)ctrl;
view.TaskID = elementID;
}
protected
void
RadGrid1_ItemDataBound(
object
sender, GridItemEventArgs e)
{
if
(e.Item.ItemType == GridItemType.Item || e.Item.ItemType == GridItemType.AlternatingItem)
{
Control target = e.Item.FindControl(
"hlShowTrackingStatus"
);
if
(!Object.Equals(target,
null
))
{
if
(!Object.Equals(
this
.RadToolTipManager1,
null
))
{
//Add the button (target) id to the tooltip manager
this
.RadToolTipManager1.TargetControls.Add(target.ClientID, (e.Item
as
GridDataItem).GetDataKeyValue(
"Sequence"
).ToString(),
true
);
}
}
Control target2 = e.Item.FindControl(
"hlFileAttachments"
);
if
(!Object.Equals(target2,
null
))
{
if
(!Object.Equals(
this
.RadToolTipManager2,
null
))
{
//Add the button (target) id to the tooltip manager
this
.RadToolTipManager2.TargetControls.Add(target2.ClientID, (e.Item
as
GridDataItem).GetDataKeyValue(
"Sequence"
).ToString(),
true
);
}
}
}
}
help me please
Thanks!
Your code seems to be correct and I cannot tell you what is causing the issue. I prepared a sample demo based on it and I attached it to the thread for your reference. Please, examine my demo and let me know what I should modify in order to reproduce the issue on my side and I will do my best to help.
All the best,Svetlina
the Telerik team