Tipify RadGrid column headings

4 posts, 1 answers
  1. John Billiris (JSBBS)
    John Billiris (JSBBS) avatar
    27 posts
    Member since:
    Mar 2007

    Posted 15 Sep 2008 Link to this post

    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" ?

  2. Answer
    Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 16 Sep 2008 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Tervel
    Admin
    Tervel avatar
    1337 posts

    Posted 16 Sep 2008 Link to this post

    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.
  5. John Billiris (JSBBS)
    John Billiris (JSBBS) avatar
    27 posts
    Member since:
    Mar 2007

    Posted 16 Sep 2008 Link to this post

    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

Back to Top