Tooltip inside radgrid

2 posts, 0 answers
  1. Rizwan Ansari
    Rizwan Ansari avatar
    26 posts
    Member since:
    Nov 2009

    Posted 19 Dec 2011 Link to this post

    Dear All,
    i am doing tooltip in radgrid as http://demos.telerik.com/aspnet-ajax/tooltip/examples/targetcontrolsandajax/defaultcs.aspx 
    demo,but i want to get gridbound column value of that row on UpdateToolTip method,as i can get datakeyvalue.

    how can i get?

    thanks & regards
  2. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3596 posts

    Posted 20 Dec 2011 Link to this post

    Hi Rizwan,

    Please examine the code-behind of the demo carefully. You will see that in the RadGrid1_ItemDataBound event where the target controls are added to the RadToolTipManager the value each entry holds is extracted from the grid and is passed to the Value string of the tooltip. This is done with the following line:
    this.RadToolTipManager1.TargetControls.Add(target.ClientID, (e.Item as GridDataItem).GetDataKeyValue("ProductID").ToString(), true);

    The first parameter is the ID of the HTML element that will be tooltipified, the second is the internally handled Value property which can be obtained in the OnAjaxUpdate event of the RadToolTipManager:
    his.UpdateToolTip(args.Value, args.UpdatePanel);

    and the third is a flag that indicates it fhe first parameter is the server ID or the calculated ClientID of the target element.

    Kind regards,
    Marin
    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top