Setting a tooltip to a specific child template title on hierarchical radgridview.

1 Answer 22 Views
GridView
rayala25
Top achievements
Rank 1
rayala25 asked on 29 Apr 2022, 03:51 PM

Hi, 

I need to set a tooltip to a specific title of a child template of a hierarchical radgridview.

On column titles i can set it without problem using ViewCellFormatting event, but on tabbed childs template titles i can't.

(Radgridview for winforms)

Please help.

1 Answer, 1 is accepted

Sort by
0
Accepted
Dess | Tech Support Engineer, Principal
Telerik team
answered on 02 May 2022, 07:00 AM

Hello, Roberto,  

I have prepared a sample code snippet demonstrating how to assign a tooltip for the child tabs:

        this.radGridView1.ToolTipTextNeeded += radGridView1_ToolTipTextNeeded;

        private void radGridView1_ToolTipTextNeeded(object sender, ToolTipTextNeededEventArgs e)
        {
            RadPageViewStripItem stripItem = sender as RadPageViewStripItem;
            if (stripItem != null)
            {
                e.ToolTipText = stripItem.Text;
            }
        }

I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

Regards,
Dess | Tech Support Engineer, Principal
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

rayala25
Top achievements
Rank 1
commented on 02 May 2022, 01:33 PM

It works fine, Thank you!.

I added stripItem,.Title to check for a specific tab.

 

Private Sub radGridView1_ToolTipTextNeeded(sender As Object, e As ToolTipTextNeededEventArgs) Handles rdg1.ToolTipTextNeeded
        Dim stripItem As RadPageViewStripItem = TryCast(sender, RadPageViewStripItem)
        If stripItem IsNot Nothing Then
            If stripItem.Title = "Details" Then
                e.ToolTipText = "(Last 30 days)"
            End If
        End If
    End Sub
Tags
GridView
Asked by
rayala25
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or