RadGrid and Tooltip

7 posts, 0 answers
  1. John
    John avatar
    88 posts
    Member since:
    Nov 2007

    Posted 24 Mar 2008 Link to this post

    I'm using the radgrid and have it as a databound columns.  How can i insert a tooltip on a specific column where each row passes its unique id to web service for the text?

    I'm having trouble figuring out how to procede and can't find an example similar to this.  Thanks.
  2. Tervel
    Tervel avatar
    1337 posts

    Posted 28 Mar 2008 Link to this post

    Hello John,

    I suggest looking at the following two examples:

    Bind To Target
    This example shows three scenarios of binding the tooltip - and one of them is using Telerik RadGrid with bound columns.

    This example from the Futures build demos shows configuring the tooltip to a web-service using the Northwind database.

    Essentially what you need to do is combine the two examples. If you feel more comfortable with AJAX,then first implement your code to run with the RadToolTipManager OnAjaxUpdate handler, then replace it with a WebService, as demonstrated in the second example.

    Best wishes,
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. DevCraft R3 2016 release webinar banner
  4. JustinWong
    JustinWong avatar
    147 posts
    Member since:
    Mar 2007

    Posted 23 Dec 2011 Link to this post

    Hi: I looked at the example. True, one of them showed ToolTip with a grid with bound column. HOWEVER, the ToolTip in this example doesNOT target the boundcolumn. Instead, it targets a template column.  How to you set a RadToolTip for a bound column?  For example, in the demo you referred to, how does one set a RadToolTip for the bound ID column (instead of the templated name column)?
  5. Svetlina Anati
    Svetlina Anati avatar
    2795 posts

    Posted 26 Dec 2011 Link to this post

    Hello Justin,


    What I suggest is the following:

    1) Use the ItemDataBound event in order to be able to reference the items
    2) In 1) find the desired particular cell you want to tooltipify
    3) Add its client ID to the TargetControls collection

    You can see this logic in the demo below (the GridView, tooltipified by the manager, note that this is not a RadGrid but the logic is very similar and you can use it as a start point):


    In case you encounter a problem, let us know and provide more details on the issue and we will do our best to help.

    Svetlina Anati
    the Telerik team
    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 their blog feed now
  6. Albert Shenker
    Albert Shenker avatar
    550 posts
    Member since:
    Mar 2004

    Posted 27 Sep 2012 Link to this post

    How would one tootipify a grid CELL not a grid row. The example you provided shows a row. I tried getting a reference to the cell clientId in the ItemDataBound event using the following but it didn't work:

    Dim dItem As GridDataItem = CType(e.Item, GridDataItem)
                    myToolTipManager.TargetControls.Add(dItem("colname").ClientID, someValue, True)
  7. Marin Bratanov
    Marin Bratanov avatar
    3555 posts

    Posted 28 Sep 2012 Link to this post

    Hi Albert,

    The following help article shows how you can access cells and rows: http://www.telerik.com/help/aspnet-ajax/grid-accessing-cells-and-rows.html. Its second section treats your case.

    Said shortly, you will need exactly what you supposed:
    Me.RadToolTipManager1.TargetControls.Add(CType(e.Item, GridDataItem)("UnitPrice").ClientID, (TryCast(e.Item, GridDataItem)).GetDataKeyValue("ProductID").ToString(), True)

    I tried this in the following online demo: http://demos.telerik.com/aspnet-ajax/tooltip/examples/targetcontrolsandajax/defaultcs.aspx?product=tooltip. I am attaching here the file and a video from my test.

    Kind regards,
    Marin Bratanov
    the Telerik team
    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 their blog feed now.
  8. <span>w</span>
    <span>w</span> avatar
    84 posts
    Member since:
    Jun 2012

    Posted 13 Oct 2012 Link to this post

    My Dear, use this code to add tooltip to specific column

    <telerik:GridTemplateColumn DataField="Message" HeaderText="Message" SortExpression="Message" UniqueName="Message">
                                                <ItemStyle Width="350px"></ItemStyle>
    <asp:LinkButton ID="lnkMessage" CssClass="mylink" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Message") %>' />
                                                <telerik:RadToolTip ID="RadToolTip1" runat="server" TargetControlID="lnkMessage" Text="View Detail"
                                                    RelativeTo="Mouse" Position="TopLeft" ></telerik:RadToolTip>

    Muhammad Waseem
Back to Top
DevCraft R3 2016 release webinar banner