5 Answers, 1 is accepted
0
Hello Annette,
Please, give us more details about the issue you describe. Do you use RadToolTip or RadToolTipManager? What are the setting you use to get the tooltip appear when the user places the mouse over the RadGrid? What is running twice? Does the tooltip appear twice or you have some code which is executed twice when the tooltip appears? I would like to ask you provide a code snippet which demonstrates you settings and give us more information about your scenario and the problem you observe.
Best wishes,
Sophy
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Please, give us more details about the issue you describe. Do you use RadToolTip or RadToolTipManager? What are the setting you use to get the tooltip appear when the user places the mouse over the RadGrid? What is running twice? Does the tooltip appear twice or you have some code which is executed twice when the tooltip appears? I would like to ask you provide a code snippet which demonstrates you settings and give us more information about your scenario and the problem you observe.
Best wishes,
Sophy
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0

avarndel
Top achievements
Rank 1
answered on 29 Jul 2008, 01:17 PM
I'm using a radTooltip manager. The tooltip code is actually running twice. Here is how I'm launching it. This part actually runs twice:(RadToolTipManager1.AjaxUpdate)
apsx.
<telerik:RadToolTipManager ID="RadToolTipManager1" runat="server"
OnAjaxUpdate="RadToolTipManager1_AjaxUpdate" Position="Center" Sticky="True"
Title="Staff Profile" RelativeTo="Element">
</telerik:RadToolTipManager>
<asp:repeater id="repeater1" runat="server" datasourceid="sdsStaffView" Visible="False">
<itemtemplate>
<div>
<asp:label id="lblName" runat="server"><%#Eval("UserID")%></asp:label></div>
</itemtemplate>
</asp:repeater>
aspx.vb
Protected Sub RadToolTipManager1_AjaxUpdate(ByVal sender As Object, ByVal e As Telerik.Web.UI.ToolTipUpdateEventArgs) Handles RadToolTipManager1.AjaxUpdate
Me.UpdateToolTip(e.Value, e.UpdatePanel)
End Sub
Sub UpdateToolTip(ByVal elementID As String, ByVal panel As UpdatePanel)
Dim ctrl As Control = Page.LoadControl("~\UserControls\StaffProfile.ascx")
panel.ContentTemplateContainer.Controls.Add(ctrl)
Dim details As StaffProfile = DirectCast(ctrl, StaffProfile)
details.UserID = CType(elementID, Integer)
End Sub
Protected Sub StaffGrid_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles StaffGrid.ItemDataBound
If e.Item.ItemType = GridItemType.AlternatingItem OrElse e.Item.ItemType = GridItemType.Item Then
Dim requestRowView As DataRowView = TryCast(e.Item.DataItem, DataRowView)
If requestRowView IsNot Nothing Then
Dim reqID As Integer = CInt(requestRowView("UserID"))
Dim gridItem As GridDataItem = TryCast(e.Item, GridDataItem)
Dim target As New ToolTipTargetControl(gridItem.ClientID, CType(reqID, String), True)
RadToolTipManager1.TargetControls.Add(target)
End If
End If
End Sub
apsx.
<telerik:RadToolTipManager ID="RadToolTipManager1" runat="server"
OnAjaxUpdate="RadToolTipManager1_AjaxUpdate" Position="Center" Sticky="True"
Title="Staff Profile" RelativeTo="Element">
</telerik:RadToolTipManager>
<asp:repeater id="repeater1" runat="server" datasourceid="sdsStaffView" Visible="False">
<itemtemplate>
<div>
<asp:label id="lblName" runat="server"><%#Eval("UserID")%></asp:label></div>
</itemtemplate>
</asp:repeater>
aspx.vb
Protected Sub RadToolTipManager1_AjaxUpdate(ByVal sender As Object, ByVal e As Telerik.Web.UI.ToolTipUpdateEventArgs) Handles RadToolTipManager1.AjaxUpdate
Me.UpdateToolTip(e.Value, e.UpdatePanel)
End Sub
Sub UpdateToolTip(ByVal elementID As String, ByVal panel As UpdatePanel)
Dim ctrl As Control = Page.LoadControl("~\UserControls\StaffProfile.ascx")
panel.ContentTemplateContainer.Controls.Add(ctrl)
Dim details As StaffProfile = DirectCast(ctrl, StaffProfile)
details.UserID = CType(elementID, Integer)
End Sub
Protected Sub StaffGrid_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles StaffGrid.ItemDataBound
If e.Item.ItemType = GridItemType.AlternatingItem OrElse e.Item.ItemType = GridItemType.Item Then
Dim requestRowView As DataRowView = TryCast(e.Item.DataItem, DataRowView)
If requestRowView IsNot Nothing Then
Dim reqID As Integer = CInt(requestRowView("UserID"))
Dim gridItem As GridDataItem = TryCast(e.Item, GridDataItem)
Dim target As New ToolTipTargetControl(gridItem.ClientID, CType(reqID, String), True)
RadToolTipManager1.TargetControls.Add(target)
End If
End If
End Sub
0
Hi Annette,
The problem you describe is most probably result of having both set - the AutoEventWireUp attribute of the @ Page directive in the aspx page set to true and the Handles keyword to the RadToolTipManager1_AjaxUpdate event handler
Protected Sub RadToolTipManager1_AjaxUpdate(ByVal sender As Object, ByVal e As Telerik.Web.UI.ToolTipUpdateEventArgs) Handles RadToolTipManager1.AjaxUpdate
which specifies which event the RadToolTipManager1_AjaxUpdate handles.
If the AutoEventWireup attribute of the @ Page directive is set to true the ASP.NET framework automatically calls page event-handler methods without the need to use the Handles keyword or an explicit event delegate, otherwise, you will need to take care of calling page event-handler methods. The AutoEventWireUp attribute in a VB aspx page is set to false by default.
If you use both the AutoEventWireup set to true and the Handles keyword the corresponding event handler will be fired twice. Please, make sure that you use only one of these. If you want to have the Handles keyword to every event handler you will need to set the AutoEventWireup attribute of the @ Page directive to false.
If you need further assistance, do contact us again.
Kind regards,
Sophy
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
The problem you describe is most probably result of having both set - the AutoEventWireUp attribute of the @ Page directive in the aspx page set to true and the Handles keyword to the RadToolTipManager1_AjaxUpdate event handler
Protected Sub RadToolTipManager1_AjaxUpdate(ByVal sender As Object, ByVal e As Telerik.Web.UI.ToolTipUpdateEventArgs) Handles RadToolTipManager1.AjaxUpdate
which specifies which event the RadToolTipManager1_AjaxUpdate handles.
If the AutoEventWireup attribute of the @ Page directive is set to true the ASP.NET framework automatically calls page event-handler methods without the need to use the Handles keyword or an explicit event delegate, otherwise, you will need to take care of calling page event-handler methods. The AutoEventWireUp attribute in a VB aspx page is set to false by default.
If you use both the AutoEventWireup set to true and the Handles keyword the corresponding event handler will be fired twice. Please, make sure that you use only one of these. If you want to have the Handles keyword to every event handler you will need to set the AutoEventWireup attribute of the @ Page directive to false.
If you need further assistance, do contact us again.
Kind regards,
Sophy
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0

avarndel
Top achievements
Rank 1
answered on 30 Jul 2008, 01:27 PM
My autowireup is set to false which is why the Handles is on the function. If I take the Handles off the fuction, it runs once, however all my formatting in my UserControl is gone.
Hmm..
av
Hmm..
av
0
Hi Annete,
Judging from your words in your last post it seems that the RadToolTipManager1_AjaxUpdate is wired twice as a handler to the OnAjaxUpdate event as when you remove the Handles keyword it is called only once. Please, check whether you have somewhere in the code the AddHandler keyword to attach handler to the OnAjaxUpdate event. Unfortunately, I am not able to give you any further suggestions without being able to reproduce the issue on my side.
Please, open a support ticket and send us a simple running project which reproduces the issue sending us all the needed files for testing it. As soon as I receive your test app I will test it locally, investigate the issue and do my best to help you.
Best regards,
Sophy
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Judging from your words in your last post it seems that the RadToolTipManager1_AjaxUpdate is wired twice as a handler to the OnAjaxUpdate event as when you remove the Handles keyword it is called only once. Please, check whether you have somewhere in the code the AddHandler keyword to attach handler to the OnAjaxUpdate event. Unfortunately, I am not able to give you any further suggestions without being able to reproduce the issue on my side.
Please, open a support ticket and send us a simple running project which reproduces the issue sending us all the needed files for testing it. As soon as I receive your test app I will test it locally, investigate the issue and do my best to help you.
Best regards,
Sophy
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.