In order to not have to many columns in my grid, I would like to show some not so important ones in a Tooltip.
This Tooltip should be displayed as soon as the user is having his mouse over any row/cell of my data grid.
The datagrid is bound directly to my collection of objects.
I've done this so far but can't get the values of my bindings populated in the tool tip:
<dxg:GridControl ItemsSource="{Binding Cars[Pending]}" AutoPopulateColumns="True">
<dxg:GridControl.View>
<dxg:TableView Style="{StaticResource DxTableViewStyle}" FocusedRow="{Binding Path=PendingCarSelected,Mode=TwoWay}">
<dxg:TableView.CellStyle>
<Style TargetType="dxg:CellContentPresenter">
<Style.Triggers>
<DataTrigger Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Mode=Self}}" Value="True">
<Setter Property="ToolTip">
<Setter.Value>
<StackPanel>
<WrapPanel>
<TextBlock Text="Car Brand:"/>
<TextBlock Text="{Binding Brand}"/>
</WrapPanel>
<WrapPanel>
<TextBlock Text="Car Type:"/>
<TextBlock Text="{Binding Type}"/>
</WrapPanel>
</StackPanel>
</Setter.Value>
</Setter>
</DataTrigger>
</Style.Triggers>
</Style>
</dxg:TableView.CellStyle>
</dxg:TableView>
</dxg:GridControl.View>
<dxg:GridControl.Columns>
<dxg:GridColumn Header="Engine" FieldName="Engine" ReadOnly="False" />
<dxg:GridColumn Header="Id" FieldName="Id" ReadOnly="True" />
Would you have an idea on how to solve this? Ideally, if no value avaialble, would also like to replace it by an "-"
thank you!