This is a migrated thread and some comments may be shown as answers.

Tooltip inside radgrid

1 Answer 63 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Rizwan Ansari
Top achievements
Rank 1
Rizwan Ansari asked on 19 Dec 2011, 01:25 PM
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

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 20 Dec 2011, 04:07 PM
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
Tags
ToolTip
Asked by
Rizwan Ansari
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or