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

Tipify RadGrid column headings

3 Answers 64 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
John Billiris (JSBBS)
Top achievements
Rank 1
John Billiris (JSBBS) asked on 16 Sep 2008, 02:43 AM
I've looked through the demos and the forum, and it appears possible to tooltipify row content with the RadToolTip.

Has anyone coded a way to tipify the column headings of a RadGrid?

Eg. If the column heading is "Quantity Consumed", would it be possible to have a Tooltip appear saying "Quantity is measured in litres" ?

3 Answers, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 16 Sep 2008, 10:50 AM
Hi John,

Try setting the ToolTip for the column header in the ItemDatabound event instead of  using RadToolTip control.

CS:
protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e) 
    { 
        if (e.Item is GridHeaderItem) 
        { 
            GridHeaderItem header = (GridHeaderItem)e.Item; 
            if (header["columnUniqueName"].Text == "Quantity Consumed") 
                header["columnUniqueName"].ToolTip = "Quantity is measured in litres"
        } 
    } 


Thanks
Princy.
0
Tervel
Telerik team
answered on 16 Sep 2008, 03:23 PM
Hello John,

If you go with the code provided below, you should also add the header.ID or header.ClientID to the RadToolTipManager's Target controls, e.g.

RadToolTipManager.TargetControls.Add(header.ID);


Kind regards,
Tervel
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
John Billiris (JSBBS)
Top achievements
Rank 1
answered on 16 Sep 2008, 11:25 PM

Princy,
Thanks for the code. It works well.

Tervel,
Or just set the AutoTooltipify="true" for the RadToolTipManager.


Telerik,
Could you please consider tooltips for column headings as a possible enhancement to the RadGrid.

Thanks all,
John

Tags
ToolTip
Asked by
John Billiris (JSBBS)
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Tervel
Telerik team
John Billiris (JSBBS)
Top achievements
Rank 1
Share this question
or