Tooltip for dynamic row values in a grid

2 posts, 0 answers
  1. Bhuvaneshwari
    Bhuvaneshwari avatar
    7 posts
    Member since:
    Nov 2014

    Posted 27 Mar 2015 Link to this post

    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>
  2. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3596 posts

    Posted 27 Mar 2015 Link to this post

    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.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top