Not geting Tooltip at correct postion of Items in RadLIstbox

3 posts, 0 answers
  1. ashirvad
    ashirvad avatar
    2 posts
    Member since:
    Aug 2011

    Posted 15 Sep 2011 Link to this post

    Hi Telerik team,
    I am using a Radlistbox and show a tooltip .The proble is i am not able to get the tooltip at correct position . Here is my RadlistBOx code.
    <telerik:RadListBox ID="RadListBox2" runat="server" Width="280px" Height="280px"
             CssClass ="radcss" AutoPostBackOnTransfer="true"  AllowTransferOnDoubleClick="true"
                SelectionMode="Multiple" AutoPostBackOnReorder="true" EnableDragAndDrop="true" AutoPostBack="true"
                     Skin="Office2010Blue"     OnSelectedIndexChanged="row_click"
                     AllowDelete="True"  >
                <ButtonSettings ShowTransferAll="false" />

    and here is my tooltip code. Actually i am using user control as tooltip.

    <telerik:RadToolTip ID="RadToolTip1" runat="server" BackColor="white"  
                ManualClose="false"   OnClientBeforeShow="OnClientBeforeShow"  Relative To ="Element"
                  RenderInPageRoot="true" EnableShadow="true" Animation="Slide"   >
                 <web:web ID ="tooltip" runat="server" /></telerik:RadToolTip>

    and here is my c # code onSelectedIndexChanged="row_click"
    public void row_click(object sender, EventArgs e)
            tooltip.UserName = Convert.ToString(((Telerik.Web.UI.ControlItem)(((Telerik.Web.UI.RadListBox)(sender)).SelectedItem)).Text);
            RadToolTip1.TargetControlID = ((System.Web.UI.Control)(((Telerik.Web.UI.RadListBox)(sender)).SelectedItem)).UniqueID;
            RadToolTip1.RelativeTo =Telerik.Web.UI.ToolTipRelativeDisplay.Element;
            RadToolTip1.Position = ToolTipPosition.MiddleRight;
            RadToolTip1.Overlay = true;
                RadToolTip1.ShowEvent = Telerik.Web.UI.ToolTipShowEvent.OnClick;

    And here is my defect: It is coming perfectly for first 12 elements which loads on page refresh. But the moment i scroll down and then select and item in radlistbox . Tooltip  position goes up. I have tried many things. please help me asap.

    Screenshot of problem. please use Google chrome to check my problem.

  2. Marin Bratanov
    Marin Bratanov avatar
    3899 posts

    Posted 16 Sep 2011 Link to this post

    Hello Ashirvad,

    There are some difficulties under WebKit browsers when the content is scrolled, as these browsers do not return proper dimensions in some scenarios. In this case I was able to get this working correctly by manually adjusting the tooltip's position in its OnClientShow event (you should not do it earlier, as this is the first point where it is guaranteed that its UI is rendered). You can find attached my test page and a video from my experiment:

    On a side note - I would recommend setting the properties in the markup of the RadToolTIp instead of each time in the code-behind. Also you need the ClientID of the target element, not its UniqueID.

    For this workaround in particular I would advise that you do not use animations, as they postpone the OnClientShow event, which in turn makes the reposition jump more visible.

    Kind regards,
    the Telerik team
    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal
  3. ashirvad
    ashirvad avatar
    2 posts
    Member since:
    Aug 2011

    Posted 17 Sep 2011 Link to this post

    HI Team,
    Thanks for your support. It worked. Also i set Animation="None". So that the defect wont be visible.
    Thanks again :)
Back to Top