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

Tooltip for the Childgridview[Hierarchy Gridview] cell

3 Answers 107 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Pradeep Enugala
Top achievements
Rank 1
Pradeep Enugala asked on 05 Aug 2010, 12:10 PM
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.

3 Answers, 1 is accepted

Sort by
0
Martin Vasilev
Telerik team
answered on 10 Aug 2010, 04:06 PM
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
0
Pradeep Enugala
Top achievements
Rank 1
answered on 11 Aug 2010, 06:37 AM
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
0
Martin Vasilev
Telerik team
answered on 13 Aug 2010, 03:48 PM
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
Tags
GridView
Asked by
Pradeep Enugala
Top achievements
Rank 1
Answers by
Martin Vasilev
Telerik team
Pradeep Enugala
Top achievements
Rank 1
Share this question
or