The problem is that the AjaxUpdate event handler gets called even when the search button is clicked. This happens only after the user has viewed one of the tool tips. So, the user arrives on the page and clicks the search button. The search results are displayed (AjaxUpdate is not called). Then the user views a tooltip. AjaxUpdate is called to load the content (as it should be). Then the user clicks the search button again. This time AjaxUpdate *is* called, even though there is no tooltip involved.
My workaround is this code in the AjaxUpdate handler:
if (Request.Form["__EVENTTARGET"] != e.UpdatePanel.ClientID) {
return;
}
Is this expected behavior, or a bug, or what?
9 Answers, 1 is accepted
Hi Dan,
I am not quite sure about your exact configuration and since I do not have your code I can only assume what might be happening on your side. Do you by any chance use a build, older than Q3 2008 (version 2008.3 1105) and have a RadToolTipManager with Autotooltipify set to false and you update it with AJAX? If so, note that there is a known problem when updating the RadToolTipManager with AJAX concerning the Autotooltipify property and we are currently working on it. In order to solve the problem I suggest to use a fake control and add it to the TargetControls collection in the markup - in this case, the tooltipmanager will not iterate trough all the controls to autotooltipify them.
In our latest build the Autotooltipify property is set to false by default and depending on the specific scenario the problem might disappear but I cannot tell you this for sure because I do not have your code.
This bieng said, if this is the problem, either use a fake target control or upgrade to the latest build and test again. If this is not the case, please prepare a sample, fully runnable reproduction project, open a new support ticket and send it to me along with detailed reproduction instructions.
Regards,
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
I will see if I can create a sample project.
Thank you for th eprovided information but unfortunately I am not aware of such problem with the mentioned cnfiguration. I think that indeed the best way to proceed is that you open a support ticket and provide a sample demo. The demo does not need to replicate your whole logic and functionality - please use the less code you can to reproduce the issue. Once I receive the demo and I am able to run it locally I will do my best to help you out.
Greetings,
Svetlina
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
{
if (this.IsPostBack)
{
var x = sender as Control;
if (x.ClientID.ToLower().IndexOf("rttmAdd".ToLower()) > -1)
{
var NamesEdit = this.Page.LoadControl("~/WebControls/Sub/Names_Edit.ascx") as Names_Edit;
e.UpdatePanel.ContentTemplateContainer.Controls.Add(NamesEdit);
}
}
}
I had something like this happening (where AjaxUpdate event is raised unexpectedly), this is how I solved this problem.
If sender is not self, then just ignore.
Is there a newer build that I should download/install?
Thank you.
There was a fix to the problem but when testing it, it turned out that this fix caused problems in some common scenarios and that is why we rolled it back. The workaround Shawn provided can be used as a temporary solution and you can use it until we find the best solution to incorporated in the the source code.
We are currently working on fixing the problem and once we do, I will follow you up in this thread.
All the best,
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.
http://www.telerik.com/community/forums/aspnet-ajax/grid/radtooltipmanager-problems-with-radgrid.aspx
Where the OnAjaxUpdate event is not called onmouseover in my radgrid unless i perform some event that causes a postback which it is then called eveytime i mouseover.
By the way I still need help with my problem if there is a solution.
I do not think that the problem you describe is the same as discussed in this thread,. However, since the problem occurs only when AJAX request is pperformed and everything works if there is a plain postback, what I can assume is that you update teh target controls but you do not update the tooltip manager and it stores the old targets and values. Please make sure that the manager is updated along with the targets as explained below:
http://demos.telerik.com/aspnet-ajax/tooltip/examples/targetcontrolsandajax/defaultcs.aspx
As to tooltipifying each row of the grid correctly, you should add an aditional condition and modify your code in the following manner:
protected void Grid1_ItemDataBound(object sender, DataGridItemEventArgs e) |
{ |
DataRowView row = (DataRowView)e.Item.DataItem; |
if (e.Item.ItemType == ListItemType.AlternatingItem || e.Item.ItemType == ListItemType.Item) |
{ |
string country = row["Country"].ToString(); |
RadToolTipManager1.TargetControls.Add(e.Item.ClientID, country, true); |
} |
} |
Please, use the provided code and example as a start point for your implementation.
Greetings,
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.
I am glad to inform you that the problem with the extra firing of the OnAjaxUpdate event of the RadToolTipManager is already solved. The fix is available in our latest SP which was released yesterday and which is already uploaded for download in your accounts.
All the best,
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.