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

Tool tip not updating when grid is filtered by combobox

2 Answers 103 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Dwayne
Top achievements
Rank 1
Dwayne asked on 26 Mar 2010, 02:48 AM
 I  have a similar scenario to the online demo Demo . my issue is that when i use a combobox to filter the grid the tooltip manager is not updated. Instead it retains the datakey for the 1st ,2nd record rather than those of the  filtered items. Here are snippets of my code...
Public Sub OnAjaxUpdate(ByVal sender As ObjectByVal args As ToolTipUpdateEventArgs)  
        Me.UpdateToolTip(args.Value, args.UpdatePanel)  
End Sub 
Private Sub UpdateToolTip(ByVal elementID As StringByVal panel As UpdatePanel)  
        Dim ctrl As Control = Page.LoadControl("~/UserControls/ControlRoot/TooTips/Tip.ascx")  
        panel.ContentTemplateContainer.Controls.Add(ctrl)  
        Dim details As EquipmentTip = DirectCast(ctrl, EquipmentTip)  
        details.ID = CType(elementID, Int32)  
End Sub 


tool tip manager
  <telerik:RadToolTipManager ID="RadToolTipManager1" OffsetY="-1" HideEvent="ManualClose" 
            Width="250" Height="350" runat="server" OnAjaxUpdate="OnAjaxUpdate" RelativeTo="Element" 
            Position="MiddleRight" Skin="Windows7" ShowDelay="100" Sticky="True">  
  </telerik:RadToolTipManager> 



grid template column

<telerik:GridTemplateColumn HeaderText=" Owner" SortExpression="OwnerStatusDescription">  
                        <ItemTemplate> 
                            <asp:HyperLink ID="targetControl" NavigateUrl="#" runat="server" Text='<%# Eval("OwnerStatusDescription") %>'</asp:HyperLink> 
                        </ItemTemplate> 
 </telerik:GridTemplateColumn> 


and my ajax manager



<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1" 
    ClientEvents-OnRequestStart="requestExportStart" > 
    <ClientEvents OnRequestStart="requestExportStart"></ClientEvents> 
    <AjaxSettings> 
        <telerik:AjaxSetting AjaxControlID="ComboBox">  
            <UpdatedControls> 
                <telerik:AjaxUpdatedControl ControlID="RadToolTipManager1" /> 
                <telerik:AjaxUpdatedControl ControlID="Grid" /> 
            </UpdatedControls> 
        </telerik:AjaxSetting> 
        <telerik:AjaxSetting AjaxControlID="Grid">  
            <UpdatedControls> 
                <telerik:AjaxUpdatedControl ControlID="RadToolTipManager1" /> 
                <telerik:AjaxUpdatedControl ControlID="Grid" /> 
            </UpdatedControls> 
        </telerik:AjaxSetting> 
    </AjaxSettings> 
</telerik:RadAjaxManager> 


is there a way to make sure that this doesn't happen i.e. via code or client script .

How do I manually clear the tootip and reasign the filtered values???

2 Answers, 1 is accepted

Sort by
0
Dwayne
Top achievements
Rank 1
answered on 27 Mar 2010, 01:24 PM
I have been playing with this because it seems too simple it turns out that eachh time you rebind the grid you have to clear the tool tip
RadToolTipManager1.TargetControls.Clear()

and this gives you yyour new values

 

0
Svetlina Anati
Telerik team
answered on 31 Mar 2010, 08:41 AM
Hi Dwayne,

As you have found yourself, in such scenario what you should od is the following:

1) Make sure that you update the tooltip manager when you update the target controls (the grid in this case)

2) When the grid is modified, clear the old target controls (in operations such as sorting, paging, filtering, etc)

The demo you have linked is exactly the one which explains this but for sorting and paging. This being said, the solution you have found is the correct and reliable one.

Greetings,
Svetlina
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
ToolTip
Asked by
Dwayne
Top achievements
Rank 1
Answers by
Dwayne
Top achievements
Rank 1
Svetlina Anati
Telerik team
Share this question
or