Welcome to the Xceed Community | Help
Community Search  
More Search Options

ToolTip on column header?

Sort Posts: Previous Next
  •  03-20-2008, 9:35 AM Post no. 11224

    ToolTip on column header?

    I would like to display a tooltip when the user mouses over a column's header that displays static information on what the column is, and how to use it.

    I only want the tooltip on certain columns and the info will be unique from column to column.

    Can anyone help me out? Thank you very much.
  •  03-20-2008, 10:02 AM Post no. 11225 in reply to 11224

    Re: ToolTip on column header?

    You can provide an implicit ColumnManagerCell style that has the desired tooltip. Take a look at the Displaying Tooltips example in the documentation for more information.
    Senior Technical Writer
    - Xceed Software

    In three words I can sum up everything I've learned about life: it goes on.
  •  03-20-2008, 11:46 AM Post no. 11226 in reply to 11225

    Re: ToolTip on column header?

    Please forgive my ignorance. What documenation are you reffering to?

    I'm looking in the Xceed DataGrid for WPF Documentation that installed with DataGrid 2.0.

    I don't see any topics for tooltips in the index or when I search. Also I don't see any tooltip example in the ColumnManagerCell help.

    I must be looking in the wrong spot for the example.
  •  08-18-2009, 7:49 AM Post no. 23392 in reply to 11226

    Re: ToolTip on column header?

    Could anyone tell me how to define a tooltip for a column? I can`t see any entry in the documentation..
  •  08-19-2009, 3:29 PM Post no. 23409 in reply to 23392

    Re: ToolTip on column header?

    Here is the documentation Jenny was referring to:
    http://doc.xceedsoft.com/products/XceedWpfDataGrid/Displaying%20Tooltips.html

    The example demonstrates how to add a ToolTip on any DataCell so that it displays its content as its ToolTip.

    If you want to do the same thing on the column headers, you can do the style on ColumnManagerCell instead.

    For example:

       <Style TargetType="{x:Type xcdg:ColumnManagerCell}" >
          <Setter Property="ToolTip"
                      Value="{Binding RelativeSource={RelativeSource Self}, Path=Content}" />
       </Style>


    If you want a specific ToolTip on a specific column, you need to use DataTriggers.

    For example:

       <Style TargetType="{x:Type xcdg:ColumnManagerCell}" >
          <Style.Triggers>
             <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=FieldName}"
                                 Value="Col1Name" >
                <Setter Property="ToolTip" Value="ToolTip for Col1" />
             </DataTrigger>
             <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=FieldName}"
                                 Value="Col2Name" >
                <Setter Property="ToolTip" Value="ToolTip for Col2" />
             </DataTrigger>
          </Style.Triggers>
       </Style>

     


    ** Quick Tip: Clients with an active support subscription should be sending their questions by email if they wish to benefit from the faster response time. Thanks!


    Diane Lafontaine
    Technical Support
    Xceed Software Inc.
  •  08-20-2009, 7:36 AM Post no. 23416 in reply to 23409

    Re: ToolTip on column header?

    Thank you very much, it was most helpful!
  •  04-24-2012, 12:04 PM Post no. 32029 in reply to 23409

    Re: ToolTip on column header?

    Hi,

        I need to change the column tooltip dynamically in Code behind. I'm binding with datatable in codebehind. Can you please help me how i can do this?

    for (int i = _DGCols; i < expGrid.Columns.Count; i++)

    {

    try

    {

    expGrid.ColumnsIdea.Visible = true;

    expGrid.ColumnsIdea.Title="Some Text";

    expGrid.ColumnsIdea.ToolTip="Some Text";//not available

    }

    catch { }

    }

    }

  •  05-11-2012, 11:32 AM Post no. 32099 in reply to 32029

    Re: ToolTip on column header?

    Hi Mukesh,

    The Tooltip is on the ColumnManagerCell, not on the Column.

     


    ** Quick Tip: Clients with an active support subscription should be sending their questions by email if they wish to benefit from the faster response time. Thanks!


    Diane Lafontaine
    Technical Support
    Xceed Software Inc.
View as RSS news feed in XML
Contact | Site Map | Reviews | Legal Terms of Use | Trademarks | Privacy Statement Copyright 2011 Xceed Software Inc.