State of TooltipManager and dynamically added TargetControls

14 posts, 0 answers
  1. Rainer Friedl
    Rainer Friedl avatar
    20 posts
    Member since:
    Feb 2006

    Posted 06 May 2007 Link to this post

    Hello,

    it seems that the TooltipManager control does not save the dynamically added ToolTipTargetControls in its viewstate, correct?

    Instead after a postback it works like the default behaviour without assigned TargetControls (all elements with an assigned 'title' property on the page are affected)

    Is this behaviour intended?
    The problem is critical when the TargetControls are assigned during DataBound events on list items. It does not make sense to reassign them (rebind) on every postback.

    Any ideas or workkaround?

    Kind reagrds.
    Rainer




  2. Tsvetie
    Admin
    Tsvetie avatar
    1517 posts

    Posted 08 May 2007 Link to this post

    Hello Rainer Friedl,
    We are not aware of this issue. As you can see, your scenario is very close to one of our online examples, where we add the TargetControls in the repeater1_ItemDataBound handler.

    Could you please prepare and send us a simple project, demonstrating this behavior?

    Kind regards,
    Tsvetie
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. Hanumesh
    Hanumesh avatar
    13 posts
    Member since:
    Apr 2007

    Posted 14 Jun 2007 Link to this post

    HI,
    I am also facing same problem as said by Rainer. I am following LoadonDemand example given in Online demo for RADToolTip. but am facing same problem. when the page loads for first time Tooltip is working smoothley but when the page postback happens am not able to get tooltip.
    Here am sending sample code, please have a look on this sample.
    This is my Default.aspx page

    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> 
     
    <%@ Register TagPrefix="radG" Namespace="Telerik.WebControls" Assembly="RadGrid.Net2" %> 
    <%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" 
        Namespace="System.Web.UI" TagPrefix="asp" %> 
    <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
    <%@ Register Src="Popup.ascx" TagName="Popup" TagPrefix="uc1" %> 
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    <html xmlns="http://www.w3.org/1999/xhtml">  
    <head runat="server">  
        <title>Untitled Page</title> 
        <link rel="stylesheet" href="Skins/CustomSkin/ToolTip.CustomSkin.css" type="text/css" /> 
        <link rel="stylesheet" href="style/Styles2.css" type="text/css" /> 
    </head> 
    <body> 
        <form id="form1" runat="server">  
            <div> 
                <radG:RadGrid ID="RGSample" AllowPaging="true" PageSize="15" EnableAJAX="false" AutoGenerateColumns="false" 
                    runat="server" Height="50%" DataSourceID="AccessDataSource1" OnItemDataBound="RGSample_ItemDataBound" 
                    Skin="Glassy" SkinsPath="RadControls/Grid/Skins" CssClass="RadGrid" CellPadding="2" 
                    CellSpacing="2" BackColor="#728E2B">  
                    <PagerStyle Mode="NumericPages" /> 
                    <ItemStyle CssClass="ItemStyle" /> 
                    <HeaderStyle CssClass="HeaderStyle" Width="100px" /> 
                    <MasterTableView AllowCustomPaging="False" AllowPaging="True" AllowSorting="True" 
                        GridLines="None" HorizontalAlign="NotSet" PageSize="10" CellPadding="2" CellSpacing="2" 
                        Width="100%">  
                        <Columns> 
                            <radG:GridHyperLinkColumn DataTextField="CustomerID" HeaderText="CustomerID" SortExpression="CustomerID" 
                                UniqueName="CustomerID">  
                                <HeaderStyle CssClass="HeaderStyle" ForeColor="black" Width="20%"></HeaderStyle> 
                                <FooterStyle CssClass="FooterStyle"></FooterStyle> 
                            </radG:GridHyperLinkColumn> 
                            <radG:GridTemplateColumn HeaderText="ContactName" SortExpression="ContactName" UniqueName="ContactName">  
                                <ItemTemplate> 
                                    <asp:Label ID="lblContactName" runat="server" Text='<%#Eval("ContactName") %>'></asp:Label> 
                                </ItemTemplate> 
                                <HeaderStyle CssClass="HeaderStyle" ForeColor="black"></HeaderStyle> 
                                <FooterStyle CssClass="FooterStyle"></FooterStyle> 
                            </radG:GridTemplateColumn> 
                            <radG:GridBoundColumn DataField="CompanyName" HeaderText="CompanyName" SortExpression="CompanyName" 
                                UniqueName="CompanyName">  
                                <HeaderStyle CssClass="HeaderStyle" ForeColor="black"></HeaderStyle> 
                                <FooterStyle CssClass="FooterStyle"></FooterStyle> 
                            </radG:GridBoundColumn> 
                            <radG:GridTemplateColumn UniqueName="Click">  
                                <ItemTemplate> 
                                    <asp:ImageButton ID="imgBtn" runat="server" ImageUrl="~/24find.gif" CommandName="Find" /> 
                                </ItemTemplate> 
                                <HeaderStyle CssClass="HeaderStyle" ForeColor="black"></HeaderStyle> 
                                <FooterStyle CssClass="FooterStyle"></FooterStyle> 
                            </radG:GridTemplateColumn> 
                        </Columns> 
                    </MasterTableView> 
                    <ClientSettings> 
                        <Scrolling AllowScroll="true" SaveScrollPosition="true" UseStaticHeaders="true" /> 
                    </ClientSettings> 
                </radG:RadGrid> 
                <asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="~/App_Data/Nwind.mdb" 
                    SelectCommand="SELECT top 10 [CustomerID], [CompanyName], [ContactName] FROM [Customers]">  
                </asp:AccessDataSource> 
            </div> 
            <asp:ScriptManager ID="ScriptManager1" runat="server">  
            </asp:ScriptManager> 
            <telerik:RadToolTipManager ID="RTMCustomer" runat="server" RelativeTo="Mouse" Position="MiddleRight" 
                BorderStyle="None" Width="250px" Height="300px" Animation="None" Sticky="true" 
                ManualClose="true" Skin="CustomSkin" EnableEmbeddedSkins="false" OnAjaxUpdate="RTMCustomer_OnAjaxUpdate" 
                ShowCallout="true">  
            </telerik:RadToolTipManager> 
        </form> 
    </body> 
    </html> 
     
    Following is code behind file Default.aspx.cs
    1 using System;  
    2 using System.Data;  
    3 using System.Configuration;  
    4 using System.Web;  
    5 using System.Web.Security;  
    6 using System.Web.UI;  
    7 using System.Web.UI.WebControls;  
    8 using System.Web.UI.WebControls.WebParts;  
    9 using System.Web.UI.HtmlControls;  
    10 using System.Collections;  
    11  
    12 public partial class _Default : System.Web.UI.Page   
    13 {  
    14     protected void Page_Load(object sender, EventArgs e)  
    15     {  
    16  
    17     }  
    18     protected void RGSample_ItemDataBound(object sender, Telerik.WebControls.GridItemEventArgs e)  
    19     {  
    20         if (e.Item.ItemType == Telerik.WebControls.GridItemType.Item || e.Item.ItemType == Telerik.WebControls.GridItemType.AlternatingItem)  
    21         {  
    22             System.Web.UI.WebControls.Label lblContactName = (System.Web.UI.WebControls.Label)e.Item.FindControl("lblContactName");  
    23             DataRowView currentRow = (DataRowView)e.Item.DataItem;  
    24             lblContactName.ID = currentRow.Row["CustomerID"].ToString();  
    25             this.RTMCustomer.TargetControls.Add(lblContactName.ClientID, true);  
    26         }  
    27     }  
    28     protected void RTMCustomer_OnAjaxUpdate(object sender, Telerik.Web.UI.ToolTipUpdateEventArgs e)  
    29     {  
    30         int index = e.TargetControlID.LastIndexOf("_");  
    31         string elementID = e.TargetControlID.Substring(index + 1);  
    32         this.UpdateToolTip(elementID, e.UpdatePanel);  
    33  
    34     }  
    35     private void UpdateToolTip(string elementID, UpdatePanel panel)  
    36     {  
    37         try 
    38         {  
    39             Control ctrlPopup = Page.LoadControl("Popup.ascx");  
    40             panel.ContentTemplateContainer.Controls.Add(ctrlPopup);  
    41             PopUp popUp = (PopUp)ctrlPopup;  
    42             popUp.CustomerID = elementID;  
    43         }  
    44         catch (Exception)  
    45         {  
    46               
    47         }  
    48     }  
    49 }  
    50  
    Following is my custom skin stylesheet for RADToolTip,
    /* r.a.d.tooltip CustomSkin skin */  
    /* r.a.d.tooltip resize element */  
    div.radtooltip_CustomSkin.ResizeElement  
    {  
        border: solid 1px #bbb;  
        background: #f8fce0;  
    }  
     
    div.radtooltip_CustomSkin.LoadingSign  
    {     
        background: url(ToolTip/Loading.gif)  no-repeat center;  
        width: 100%; height: 100%;  
    }  
     
    div.radtooltip_CustomSkin  
    {  
        position: absolute;  
        cursor: default;  
        -moz-user-select: none; /* disable control selection Mozilla FF */  
    }  
     
    div.radtooltip_CustomSkin.visiblecallout  
    {  
        /**/  
    }  
     
    div.radtooltip_CustomSkin.visiblecallout div.ToolTipCallout  
    {  
        display: block;  
    }  
     
     
    div.radtooltip_CustomSkin table.ToolTipWrapper  
    {  
        padding: 0; margin: 0;  
        border-collapse: collapse;  
    }  
     
    div.radtooltip_CustomSkin table.ToolTipWrapper td  
    {         
        padding: 0; margin: 0;  
        border-collapse: collapse;  
        text-align: left;  
    }  
     
    /* -------------------------- CORNER SETTINGS BEGIN ---------------------------------- */  
    div.radtooltip_CustomSkin table.ToolTipWrapper td.ToolTipTopLeft,  
    div.radtooltip_CustomSkin table.ToolTipWrapper td.ToolTipTopRight,  
    div.radtooltip_CustomSkin table.ToolTipWrapper td.ToolTipBottomLeft,  
    div.radtooltip_CustomSkin table.ToolTipWrapper td.ToolTipBottomRight  
    {  
        width: 6px; height: 6px; line-height: 1px;  
        font-size: 1px;  
        background-image: url(ToolTip/TooltipCorners.gif) ;  
        background-repeat: no-repeat;  
    }  
     
    div.radtooltip_CustomSkin table.ToolTipWrapper td.ToolTipTopLeft  
    {  
        background-position: 0 0;  
    }  
     
    div.radtooltip_CustomSkin table.ToolTipWrapper td.ToolTipTopRight  
    {  
        background-position: -11px 0;  
    }  
     
    div.radtooltip_CustomSkin table.ToolTipWrapper td.ToolTipBottomLeft  
    {  
        background-position: 0 bottom;  
    }  
     
    div.radtooltip_CustomSkin table.ToolTipWrapper td.ToolTipBottomRight  
    {  
        background-position: -11px bottom;  
    }  
     
    div.radtooltip_CustomSkin table.ToolTipWrapper td.ToolTipTopCenter,  
    div.radtooltip_CustomSkin table.ToolTipWrapper td.ToolTipBottomCenter  
    {  
        height: 6px; line-height: 1px;  
        font-size: 1px;  
        background-repeat: repeat-x;  
        background-image: url(ToolTip/ToolTipTopParts.gif) ;  
    }  
     
    div.radtooltip_CustomSkin table.ToolTipWrapper td.ToolTipTopCenter  
    {  
        background-position: 0 0;  
    }  
     
    div.radtooltip_CustomSkin table.ToolTipWrapper td.ToolTipBottomCenter  
    {  
        background-position: 0 bottom;  
    }  
     
    div.radtooltip_CustomSkin table.ToolTipWrapper td.ToolTipLeftMiddle  
    {  
        background-position: 0 0;  
        background-image: url(ToolTip/TooltipSideParts.gif);  
        background-repeat: repeat-y;  
    }  
     
    div.radtooltip_CustomSkin table.ToolTipWrapper td.ToolTipRightMiddle  
    {  
        background-position: -11px 0;  
        background-image: url(ToolTip/TooltipSideParts.gif);  
        background-repeat: repeat-y;  
    }  
    /* -------------------------- CORNER SETTINGS END ---------------------------------- */  
    div.radtooltip_CustomSkin table.ToolTipWrapper td.ToolTipContent  
    {  
        font: normal 11px Arial, Verdana, Sans-serif;  
        height: 100%;  
        background: #ffffff;  
    }  
     
    div.radtooltip_CustomSkin div.ToolTipTitlebar  
    {     
        color: black;  
        font: bold 11px Verdana, Arial, Sans-serif;  
        float:left;  
        line-height: 22px;  
    }  
     
    /* close button */  
    div.radtooltip_CustomSkin a.CloseButton,  
    div.radtooltip_CustomSkin a.CloseButton:hover  
    {  
        display: block; float: right;  
        width: 18px; line-height: 1px; height: 18px;  
        margin-top: 4px;  
        background: url(ToolTip/close.gif)  no-repeat;  
        text-indent: -9999px;  
        outline: none;  
    }  
     
    /* --------------------------------------------- TOOLTIP CALLOUT SETTINGS BEGIN --------------------------------------------- */  
    div.radtooltip_CustomSkin div.ToolTipCallout  
    {  
        position: absolute; top: 100px; left: -5px;  
        line-height: 25px; height: 100px; width: 100px; font-size: 10px;  
        background-image: url(ToolTip/Callouts.gif) ;  
        background-repeat: no-repeat;  
    }  
     
    /* position="Center" */  
    div.radtooltip_CustomSkin .Center  
    {  
        background: none !important;  
    }  
     
    /* position="BottomRight" */  
    .radtooltip_CustomSkin .TopLeft  
    {  
        margin-top: -24px; margin-left: 22px;  
        background-position: 0 -50px;  
    }  
     
    /* position="BottomCenter" */  
    .radtooltip_CustomSkin .TopCenter  
    {  
        left: 50% !important;  
        margin-top: -24px; margin-left: -12px;  
        background-position: 0 0 !important;  
    }  
     
    /* position="BottomLeft" */  
    .radtooltip_CustomSkin .TopRight  
    {  
        left: 100% !important;  
        margin-top: -24px; margin-left: -42px;  
        background-position: 0 -25px !important;  
    }  
     
    /* position="TopCenter" */  
    .radtooltip_CustomSkin .BottomCenter  
    {  
        top: 100% !important; left: 50% !important;  
        margin-left: -14px !important; margin-top: -1px !important;  
        width: 100% !important;  
        background-position: 0 -125px !important;  
    }  
     
    /* position="TopLeft" */  
    .radtooltip_CustomSkin .BottomRight  
    {  
        top: 100% !important; left: 100% !important;  
        margin-left: -42px !important; margin-top: -1px !important;  
        background-position: 0 -150px !important;  
    }  
     
    /* position="TopRight" */  
    .radtooltip_CustomSkin .BottomLeft  
    {  
        top: 100% !important;  
        margin-left: 26px !important; margin-top: -1px !important;  
        background-position: 0 -175px !important;  
    }  
     
    /* position="MiddleRight" */  
    .radtooltip_CustomSkin .MiddleLeft  
    {  
        top: 140px !important;  
        margin-left: -48px; margin-top: -1px;  
        background-position: 0 -8px !important;  
    }  
     
    /* position="MiddleLeft" */  
    .radtooltip_CustomSkin .MiddleRight  
    {  
        left: 100% !important; top: 50% !important;  
        margin-left: -1px; margin-top: -12px;  
        background-position: 0 -75px;  
    }  
    /* --------------------------------------------- TOOLTIP CALLOUT SETTINGS END --------------------------------------------- */ 

    I am facing 2 issues in ths code,
    1) I have a template column with an image button in the RADgrid. On click of this button a page postback happens, and tooltip does not work.
    2)For this grid am using a css stylesheet to display decorated grid and a custom tooltip. But when I check this page on IE, the tooltip is not showing proper style, but when I use inbuilt skin as I mentioned in Line number 5 in above code(skin="Glassy") am getting tooltip with desired custom style.

    I dont know how to post the whole project so I am sending a code snippet along with this. Please let me know is this possible to post my whole sample project in this forum.

    kindly reply for these queries as I am desperately looking for some solution.

    Thanks in advance,
    Hans.
  4. Tsvetie
    Admin
    Tsvetie avatar
    1517 posts

    Posted 14 Jun 2007 Link to this post

    Hi Hanumesh,
    We have fixed the problem, that is being discusses in this thread. Now the TargetControls collection is persisted across postbacks. Please find the attached hotfix that contains that fix. In case you are a customer, please open a new support ticket and we will send you the dev version of the hotfix.

    As for the custom skin, please open a new support thread and send us a simple running project as you cannot attach files in the forum.

    Kind regards,
    Tsvetie
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  5. Tsvetie
    Admin
    Tsvetie avatar
    1517 posts

    Posted 14 Jun 2007 Link to this post

    Hi Hanumesh,
    I have to mention one additional thing you have to keep in mind when updating your version of the Telerik.Web.UI - you should not change the IDs of the controls you add in the TargetControls collection:

    lblContactName.ID = currentRow.Row["CustomerID"].ToString();

    Sincerely yours,
    Tsvetie
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  6. Hanumesh
    Hanumesh avatar
    13 posts
    Member since:
    Apr 2007

    Posted 14 Jun 2007 Link to this post

    HI,

    Thanks for the reply. But I could not able to download attached file.
    can you send that hotfix to my personal id rhanumesh@gmail.com please.

    Thanks,
    Hans.
  7. Tsvetie
    Admin
    Tsvetie avatar
    1517 posts

    Posted 15 Jun 2007 Link to this post

    Hi Hanumesh,
    Could you please provide additional details why you cannot download the attached file. We want to make sure that everything is ok with your account. I had no problems downloading the file from our site.

    I just sent you the hotfix.

    Sincerely yours,
    Tsvetie
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  8. CK
    CK avatar
    2 posts
    Member since:
    May 2007

    Posted 15 Jun 2007 Link to this post

    I have used the following way to store/retrieve the TargetControlIds in the Session. See if this fixes without manipulating the ClientIds. Please advise if there another approach.

    .aspx

    <asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional">  
                    <ContentTemplate> 
                        <radG:RadGrid ID="RadGrid1" runat="server" AllowSorting="True" DataSourceID="AccessDataSource1" 
                            GridLines="None" OnItemDataBound="RadGrid1_ItemDataBound" OnDataBound="RadGrid1_DataBound" 
                            OnDataBinding="RadGrid1_DataBinding" OnSortCommand="RadGrid1_SortCommand">  
                            <MasterTableView DataKeyNames="ORDERID, CUSTOMERID" AutoGenerateColumns="False" CellPadding="4">  
                                <Columns> 
                                    <radG:GridTemplateColumn UniqueName="TemplateContactId">  
                                        <ItemTemplate> 
                                            <asp:Image ID="Image1" runat="server" Height="16px" ImageUrl="~/Img/arrow.gif" Width="16px" /> 
                                        </ItemTemplate> 
                                    </radG:GridTemplateColumn> 
                                    <radG:GridBoundColumn DataField="ORDERID" DataType="System.Int32" HeaderText="ORDERID" 
                                        ReadOnly="True" SortExpression="ORDERID" UniqueName="ORDERID">  
                                    </radG:GridBoundColumn> 
                                    <radG:GridBoundColumn DataField="CUSTOMERID" DataType="System.Int32" HeaderText="CUSTOMER ID" 
                                        ReadOnly="True" SortExpression="CUSTOMERID" UniqueName="CUSTOMERID">  
                                    </radG:GridBoundColumn> 
                                </Columns> 
                                <ExpandCollapseColumn Visible="False">  
                                    <HeaderStyle Width="19px" /> 
                                </ExpandCollapseColumn> 
                                <RowIndicatorColumn Visible="False">  
                                    <HeaderStyle Width="20px" /> 
                                </RowIndicatorColumn> 
                            </MasterTableView> 
                        </radG:RadGrid> 
                    </ContentTemplate> 
                </asp:UpdatePanel> 
                <asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="~/App_Data/Nwind.mdb" 
                    SelectCommand="SELECT ORDERID, CUSTOMERID FROM [Orders]"></asp:AccessDataSource> 
     
                <telerik:RadToolTipManager runat="server" ID="RadToolTipManager2" Width="80px" Height="40px" 
                    OnAjaxUpdate="RadToolTipManager2_OnAjaxUpdate" Position="BottomRight" 
                    RelativeTo="Element">  
                </telerik:RadToolTipManager> 



    .cs

        /// <summary>  
            /// TargetControl collection <control's ID, Grid Datakey>  
            /// </summary>  
            protected Dictionary<stringstring> controlCollection = new Dictionary<stringstring>();  
     
            protected void Page_Load(object sender, EventArgs e)  
            {  
            }  
     
            /// <summary>  
            /// Handles the ItemDataBound event of the RadGrid1 control.  
            /// </summary>  
            /// <param name="sender">The source of the event.</param>  
            /// <param name="e">The <see cref="Telerik.WebControls.GridItemEventArgs"/> instance containing the event data.</param>  
            protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)  
            {  
                if (e.Item.ItemType == GridItemType.Item || e.Item.ItemType == GridItemType.AlternatingItem)  
                {  
                    System.Web.UI.WebControls.Image ctrlImage = (System.Web.UI.WebControls.Image)e.Item.FindControl("Image1");  
                    if (ctrlImage != null)  
                    {  
                        DataRowView currentRow = (DataRowView)e.Item.DataItem;  
                        if (!controlCollection.ContainsKey(ctrlImage.ClientID))  
                            controlCollection.Add(ctrlImage.ClientID, currentRow.Row["ORDERID"].ToString());  
     
                        //Add the image id to the tooltip manager  
                        if (this.RadToolTipManager2 != null)  
                            this.RadToolTipManager2.TargetControls.Add(ctrlImage.ClientID, true);  
                    }  
                }  
            }  
     
            /// <summary>  
            /// Handles the OnAjaxUpdate event of the RadToolTipManager2 control.  
            /// </summary>  
            /// <param name="sender">The source of the event.</param>  
            /// <param name="args">The <see cref="Telerik.Web.UI.ToolTipUpdateEventArgs"/> instance containing the event data.</param>  
            protected void RadToolTipManager2_OnAjaxUpdate(object sender, ToolTipUpdateEventArgs args)  
            {  
                Dictionary<stringstring> controls = (Dictionary<stringstring>)Session["controlCollection"];  
                string key = controls[args.TargetControlID];  
                int index = args.TargetControlID.LastIndexOf("_");  
                string contactID = key;  
                this.UpdateToolTip(contactID, args.UpdatePanel);  
            }  
     
            /// <summary>  
            /// Updates the tool tip with content  
            /// </summary>  
            /// <param name="elementID">The element ID.</param>  
            /// <param name="panel">The panel.</param>  
            private void UpdateToolTip(string elementID, UpdatePanel panel)  
            {  
                Control ctrlToolTip = Page.LoadControl("ToolTipUserControl.ascx");  
                panel.ContentTemplateContainer.Controls.Add(ctrlToolTip);  
     
                ToolTipUserControl labelControl = (ToolTipUserControl)ctrlToolTip;  
                labelControl.LableString = elementID;  
            }  
     
            protected void RadGrid1_DataBound(object sender, EventArgs e)  
            {  
                Session.Add("controlCollection", controlCollection);  
            }  
     
           protected void RadGrid1_DataBinding(object sender, EventArgs e)  
            {  
                RadToolTipManager2.TargetControls.Clear();  
            }  
     
            protected void RadGrid1_SortCommand(object source, GridSortCommandEventArgs e)  
            {  
                RadToolTipManager2.TargetControls.Clear();  
            } 

    With the new Telerik hotfix 612 some of the previous issues have been fixed, However in the same page when I use a Prometheus RadAjaxManager or more than one UpdatePanel, the tooltip doesn't show.
     
    Thanks,
    Chandra

  9. Tsvetie
    Admin
    Tsvetie avatar
    1517 posts

    Posted 20 Jun 2007 Link to this post

    Hello CK,
    You approach for passing the ORDERID is very natural.

    As for the integration between Ajax and ToolTipManager, please review the other thread you have started with the same question.

    Regards,
    Tsvetie
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  10. Hanumesh
    Hanumesh avatar
    13 posts
    Member since:
    Apr 2007

    Posted 22 Jun 2007 Link to this post

    HI,

    I am able to download the hotfix, and I tried to display tooltip using this hotfix. But still the tooltip is not displaying on postback of the page.
    I have replaced DLLs in my bin directory with this hotfix and I have not done any changes to my code which I posted in my previous mail.

    I am adding targetcontrols as follows,

    System.Web.UI.WebControls.Label lblContactName = (System.Web.UI.WebControls.Label)e.Item.FindControl("lblContactName");  
                DataRowView currentRow = (DataRowView)e.Item.DataItem;  
                lblContactName.ID = currentRow.Row["CustomerID"].ToString();  
                this.RTMCustomer.TargetControls.Add(lblContactName.ClientID, true); 

    in Datagrid_ItemDataBound event.
    Please let me know whether I need to make code changes to use this DLL? so that TargetControls of RAD tooltip will persist even after page postback.


    Thanks,
    Hans.
  11. Tsvetie
    Admin
    Tsvetie avatar
    1517 posts

    Posted 22 Jun 2007 Link to this post

    Hello Hanumesh,
    As mentioned before,  you should not change the IDs of the controls you add in the TargetControls collection:

    lblContactName.ID = currentRow.Row["CustomerID"].ToString();  

    Sincerely yours,
    Tsvetie
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  12. Hanumesh
    Hanumesh avatar
    13 posts
    Member since:
    Apr 2007

    Posted 22 Jun 2007 Link to this post

    I am not modifying the target controls IDs of the tooltip. as I already mentioned I am adding target controls only in ItemDataBound event of the grid.
    So, when I click on the button which is inside a grid column, the page is getting postback but Tooltip is not working.

    Please suggest me.

    Thanks,
    Hans.
  13. Hanumesh
    Hanumesh avatar
    13 posts
    Member since:
    Apr 2007

    Posted 25 Jun 2007 Link to this post

    >>As mentioned before,  you should not change the IDs of the controls >>you add in the TargetControls collection:
    >>
    >>lblContactName.ID = currentRow.Row["CustomerID"].ToString();

    If I dont change the ID of the controls as mentioned above, how the tooltip manager identify which control is calling the tooltip.
    Can you please send me a sample code, so that I can modify my existing code accordingly.
    I hope you understood my problem.
    I am in need of some solution as soon as possible.
    thanks in advance.
    Hans.
  14. Tsvetie
    Admin
    Tsvetie avatar
    1517 posts

    Posted 25 Jun 2007 Link to this post

    Hello Hanumesh,
    I suppose you mean that you do not know how to pass the CustomerID to the AjaxUpdate handler of the manager - actually, this is general ASP knowledge and the implementation depends on the application needs. A possible solution would be to use the approach of CK (have a look at the code - it is part of this thread) - in the ItemDataBound handler, add the CustomerIDs to a collection and in the DataBound handler of the RadGrid, save the collection in the Session.

    An updated version of the RadToolTip control will be available with the upcoming update, scheduled for 26 June. This update will contain all fixes made to the control and in case you decide to use the new version, you should not have any problems. In case you do, please open a new support ticket and send us a simple running project - we will get back to you as soon as possible.

    Regards,
    Tsvetie
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top