Tooltip for the Childgridview[Hierarchy Gridview] cell

4 posts, 0 answers
  1. Pradeep Enugala
    Pradeep Enugala avatar
    55 posts
    Member since:
    Apr 2010

    Posted 05 Aug 2010 Link to this post

    Hi Telerik team,

    In my application I'm using the Hierarchy grid view.I want to set the tool tip for a particular cell of child gridvew.
    Please suggest how to assign it,using the Cell Formatting event we are able to set the tool tip for the Mastergridview rows.but unable to set for the cells of child grid.

    Please find theattached  screenshot.

    Thank s
    Pradeep.

  2. Martin Vasilev
    Admin
    Martin Vasilev avatar
    1061 posts

    Posted 10 Aug 2010 Link to this post

    Hi Pradeep Enugala,

    Thank you for writing.

    You can add a tooltip to any header cell element through handling the ToolTipTextNeeded event. Please consider the following sample code:

    private void radGridView1_ToolTipTextNeeded(object sender, Telerik.WinControls.ToolTipTextNeededEventArgs e)
    {
        if (sender is GridHeaderCellElement)
        {
            e.ToolTipText = ((GridHeaderCellElement)sender).Text;
        }
    }

    I hope this helps. Let me know if you have any other questions.

    Kind regards,
    Martin Vasilev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Pradeep Enugala
    Pradeep Enugala avatar
    55 posts
    Member since:
    Apr 2010

    Posted 11 Aug 2010 Link to this post

    Hi Martin,

    Thanks for the reply.

    Able to get the tooltip when mouse hovers on the headers [irrespective of parent / child ] gridview.But i also want to set the tooltip to show the cell value when any particular cell of child grid is mouse hovered and i got it by applying this code:

    if (sender is GridDataCellElement)
                {
                    if ((((Telerik.WinControls.UI.GridCellElement)(sender))).ColumnInfo.HeaderText == "column name")
                    {
                      
                        e.ToolTipText = grdStudies.MasterGridViewTemplate.ChildGridViewTemplates[0].Rows[(((Telerik.WinControls.UI.GridCellElement)(sender))).RowIndex].Cells[7].Value.ToString();
                    }
                }

    thanks
    Pradeep
  5. Martin Vasilev
    Admin
    Martin Vasilev avatar
    1061 posts

    Posted 13 Aug 2010 Link to this post

    Hello Pradeep Enugala,

    Thank you for sharing your code with us. Do not hesitate to contact us again if you have any other questions.

    Best wishes,
    Martin Vasilev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top