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

Tooltip for dynamic row values in a grid

1 Answer 265 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Bhuvaneshwari
Top achievements
Rank 1
Bhuvaneshwari asked on 27 Mar 2015, 10:28 AM
Hi,
I have a column called "CauseCode" in a grid. This column has the values like O0205,L1307,etc in each rows. Each CauseCode has corresponding descriptions like
O - Description 1(from a table in database) - Segment
02-Description 2 (from a table in database) - Subgroup
05-Description 3(from a table in database) - cause

I am not displaying these descriptions in the grid but I am getting the values and hiding them. And now when I mouse hover the CauseCode column, it should display the corresponding descriptions in a tooltip dynamically.

In the below code, the tool tip should be displayed for the column "CauseCode" but I am getting its description values like Segment, Subgroup and cause and hiding them by making their display value as false.

 Please help in this regard.
 
Please find below for the code used.

<telerik:GridBoundColumn DataField="CauseCode"
FilterControlAltText="Filter CauseCode column" HeaderText="Cause Code" UniqueName="CauseCode" Display="true" FilterControlWidth="40px">
<HeaderStyle Width="80px" />

</telerik:GridBoundColumn>


<telerik:GridBoundColumn
DataField="MissOppSegmentDesc" HeaderText="Segment Description"
UniqueName="MissOppSegmentDesc"
Visible="true" Display="false">
<HeaderStyle Width="80px" />
</telerik:GridBoundColumn>

<telerik:GridBoundColumn
DataField="MissOppSubgroupDesc" HeaderText="Subgroup Description"
UniqueName="MissOppSubgroupDesc"
Visible="true" Display="false" >
<HeaderStyle Width="80px" />
</telerik:GridBoundColumn>

<telerik:GridBoundColumn
DataField="MissOppCauseDesc" HeaderText="Cause Description"
UniqueName="MissOppCauseDesc"
Visible="true" Display="false">
<HeaderStyle Width="80px" />
</telerik:GridBoundColumn>

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 27 Mar 2015, 11:44 AM

Hi,

I am not sure how you have tried to use the RadToolTip control, but if you want to load data dynamically into it according to data from the grid, I strongly advise that you examine the following demo: http://demos.telerik.com/aspnet-ajax/tooltip/examples/targetcontrolsandajax/defaultcs.aspx?product=tooltip. It shows how you can attach tooltips to elements and let them pass information in order to load data on demand.

Depending on the type of data you intend to return, you may want to use a webservice: http://demos.telerik.com/aspnet-ajax/tooltip/examples/webservice/defaultcs.aspx.

In either case, it is likely that you will not need the three hidden columns anymore, as you will read this data only when the request fron the tooltip arrives.

Regards,

Marin Bratanov
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
Tags
ToolTip
Asked by
Bhuvaneshwari
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or