OnAjaxUpdate Not working Tooltipmanager , ListView

3 posts, 0 answers
  1. Nattapong
    Nattapong avatar
    6 posts
    Member since:
    Jun 2013

    Posted 02 Jun 2013 Link to this post


    I'm use tooltipmanager in RadListView follow by demos tooltip load on demand, But OnAjaxUpdate not working when mouseover item in radlistview 


    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <telerik:AjaxSetting AjaxControlID="ListShowAccreditation">
                    <telerik:AjaxUpdatedControl ControlID="ListShowAccreditation" LoadingPanelID="RadAjaxLoadingPanel1">
                    <telerik:AjaxUpdatedControl ControlID="RadToolTipManager1"></telerik:AjaxUpdatedControl>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">
    <telerik:RadToolTipManager runat="server" ID="RadToolTipManager1" Position="Center"
        RelativeTo="Element" Width="400px" Height="200px" Animation="Resize" HideEvent="LeaveTargetAndToolTip"
        Skin="Default" OnAjaxUpdate="OnAjaxUpdate" OnClientHide="OnClientHide" RenderInPageRoot="true"
    <asp:Label ID="Label1" runat="server" />
    <telerik:RadListView ID="RadListView1" ItemPlaceholderID="PlaceHolder_ListShowAccredit"
        runat="server" OnSelectedIndexChanged="ListBox_SelectedIndexChanged" DataValueField="AccreditationID"
            <asp:PlaceHolder ID="PlaceHolder_ListShowAccredit" runat="server" />
            <asp:Label ID="lblAccreditID" runat="server" Text='<%# Eval("AccreditationID") %>'
                Visible="false" />
                <asp:Label ID="lblAccredit" runat="server" Text='<%# Eval("Name") %>' ForeColor="#0083BA"
                    Visible="true" />
                <asp:Label ID="lblComma" Text=", " ForeColor="#0083BA" runat="server" /></a>

    In codebehind

    private void UpdateToolTip(string elementID, UpdatePanel panel)
               Control ctrl = Page.LoadControl("AccreditationPopup.ascx");
               UCAccreditationPopup details = (UCAccreditationPopup)ctrl;
               details.ID = elementID;
           protected void OnAjaxUpdate(object sender, ToolTipUpdateEventArgs args)
               this.UpdateToolTip(args.Value, args.UpdatePanel);
           protected void ListBox_SelectedIndexChanged(object sender, EventArgs e)

    I'm newbie to use telerik. 
  2. Marin Bratanov
    Marin Bratanov avatar
    4430 posts

    Posted 07 Jun 2013 Link to this post


    You need to add targets for the tooltip manager in order to have tooltips with load on demand on concrete elements. A similar example can be found in this demo: http://demos.telerik.com/aspnet-ajax/tooltip/examples/targetcontrolsandajax/defaultcs.aspx?product=tooltip. I am also attaching here a small sample that shows the logic with a listview control.

    Marin Bratanov
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
  3. Nattapong
    Nattapong avatar
    6 posts
    Member since:
    Jun 2013

    Posted 07 Jun 2013 Link to this post

    Thank you,  

    I was wrong to  e.Item.FinControl("");  

    I can do it
    Control target = e.Item.FindControl("lblAccredit");
                RadToolTipManager1.TargetControls.Add(target.ClientID, (e.Item as RadListViewDataItem).DataItemIndex.ToString(), true);
Back to Top