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

RadToolTipManager1 passing value issues

1 Answer 56 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Anshul
Top achievements
Rank 1
Anshul asked on 07 Oct 2008, 08:37 PM
Hi,

I have a Datagrid with 3 imagebuttons. I want to display a flyout user control, when the user hovers over one of the imagebuttons. I was able to pull this off using the following code in the ItemDataBound event of the grid.

 

If CType(e.Item.Cells(6).Controls(0), System.Web.UI.WebControls.ImageButton).ImageUrl = "~/PresentationLayer/img/Info_02_Info.png" Then

 

RadToolTipManager1.TargetControls.Add(

CType(e.Item.Cells(6).Controls(0), System.Web.UI.WebControls.ImageButton).ClientID, e.Item.Cells(3).Text.ToString(), True)

 

 

End If

 

The issue is that when I am setting the 'value' for the targetcontrol through code behind the value is not getting passed to the Ajaxupdate event.Although when I use markup to set the value, the correct value gets passed in. Unfortunately I cannot use markup for it, since my target control is a imagebutton on the grid.

 

Protected Sub RadToolTipManager1_AjaxUpdate(ByVal sender As Object, ByVal e As Telerik.Web.UI.ToolTipUpdateEventArgs) Handles RadToolTipManager1.AjaxUpdate

Dim ctrl As Control = Page.LoadControl("~\UserControls\SaveTemplateFlyoutDetails.ascx")

 

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

 

End Sub

 

Any help would be appreciated.

Thank you.

1 Answer, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 09 Oct 2008, 03:12 PM
Hi Anshul,

I already answered your support thread and for your convenience I pasted my reply below:

The provided code seems to be correct but I noticed that you are using an old version of RadControls. Would you please upgrade to the latest available build, namely 2008.2.1001 and test again?

If this do not fix the problem, check whether  by any chance you update the grid (paging, sorting, etc) without updating the RadToolTipManager. The described by you problem occurs in such situation. What is actually happening is that the grid gets updated and the new records have the same IDs as the old records - the RadToolTipManager's TargetControls collection is not updated and correspondingly the TargetControls' IDs seem "correct" whereas the values are the old ones. You can find a detailed explanation and a working example here. I also recommend to examine the full source code of the above demo and also the LoadOnDemand one. You can open the demos from here:

Start\Programs\Telerik\RadControls for ASPNET AJAX\Open Sample WebSite In VisualStudio

The actual location on your hard disk is the following one:

C:\Program Files\Telerik\RadControls for ASPNET AJAX \Live Demos

Please, note that the demos on the site are installed on your local disk when you install the latest build. If you are have an older installation all newer demos will be missing until installing the particular version.

As to the problem with the "small flyout shows for a split second" I assume that it comes from the resizing of the tooltip - try to explicitly set sizes to the RadToolTipManager and test again.

If the above suggestions do not help, please prepare and send me a fully working reproduction demo project (including DB if needed) along with a detailed explanation of the results of your test and reproduction instructions. Once I receive it, I will do my best to help.


Greetings,
Svetlina
the Telerik team


Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
ToolTip
Asked by
Anshul
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
Share this question
or