Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
365
xamdatagrid tooltip with autogenerate false
posted

I am using xamdatagrid, with autogenerate off.   I want to display a tool tip for each cell which is just the value in the cell.  But I can't make it work.  

I have tried the 'style' approach that I found else where in the forum, but i get an error saying I cant do that if items has been added which I am inferring has to do with the autogenerate = false. 

<Style TargetType="{x:Type igDP:CellValuePresenter}">

<Setter Property="ToolTip" Value="{Binding RelativeSource={RelativeSource Self},Path=Value}"></Setter>

</Style>

 

I have also tried something like this to set the tooltip in the fieldproperties portion of the xaml but cannot describe the path to the data in a way wpf can understand me.

<

igDP:Field Label="Timestamp" Name="entry_tstmp" ToolTip="{Binding RelativeSource={RelativeSource Self},Path=Value}" Width="80" >

 

 

  • 35319
    posted

    Hello,

     

    I am just checking if you require any further assistance on the matter.

  • 35319
    posted

    Hello,

      

    I have been looking into your question and you cannot set the tooltip for a Field in this way because this way you are setting only the tooltip for CellValuePresenter (referring its value). If you would like to activate the tooltip for a particular Field only you need to create a style to a CellValuePresenter and to refer it in the field settings for this Field like e.g. :

     

      

     

     

    <Style x:Key="cvp" TargetType="{x:Type igDP:CellValuePresenter}">

              

    <Setter Property="ToolTip" Value="{Binding RelativeSource={RelativeSource Self},Path=Value}">Setter>

    Style>

     

    ….

     

               

     

    <igDP:Field Name="FirstName" Label="Name">

                               

    <igDP:Field.Settings>

                                   

    <igDP:FieldSettings CellValuePresenterStyle="{StaticResource ResourceKey=cvp}"/>

                               

    igDP:Field.Settings>

                           

    igDP:Field>

                               

                                   

                               

                           

     

    If you need any further assistance on this matter, feel free to ask.