Hi,
I know grid can show field value while scrolling (IsScrollTipField) in tooltip. I am wondering if grid can show more than just field value. As example, my grid contains market orders and I would like to display let say order side, target shares and symbol all in tooltip. These fields are all presented in the grid in separate columns.
Something like -
Symbol: IBM
Side: BUY
Target: 1000
Could someone point me to right direction how to do this?
Thank you.
Michael
The simplest way would be to create an field that contains the concatenated information and set that as the ScrollTipField for the FieldLayout. An alternative approach, assuming that this is a flat datasource, would be to use a custom datatemplate for the RecordScrollTipInfo. e.g. Add something like the following to your DataPresenter's Resources
<HierarchicalDataTemplate DataType="{x:Type igDP:RecordScrollTipInfo}" ItemsSource="{Binding Path=Children}"> <HierarchicalDataTemplate.Resources> <DataTemplate DataType="{x:Type igDP:DataRecord}"> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition /> <ColumnDefinition /> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition Height="Auto" /> <RowDefinition Height="Auto" /> </Grid.RowDefinitions> <!-- name field --> <ContentPresenter Grid.Row="0" Grid.Column="0" TextBlock.FontWeight="Bold" VerticalAlignment="Center" ContentStringFormat="{}{0}:" Content="{Binding Path=FieldLayout.Fields[name].Label}" /> <igDP:CellValuePresenter Grid.Row="0" Grid.Column="1" Padding="0" Margin="0" BorderThickness="0" Field="{Binding Path=FieldLayout.Fields[name]}"/> <!-- email field --> <ContentPresenter Grid.Row="1" Grid.Column="0" TextBlock.FontWeight="Bold" VerticalAlignment="Center" ContentStringFormat="{}{0}:" Content="{Binding Path=FieldLayout.Fields[email].Label}" /> <igDP:CellValuePresenter Grid.Row="1" Grid.Column="1" Padding="0" Margin="0" BorderThickness="0" Field="{Binding Path=FieldLayout.Fields[email]}"/> </Grid> </DataTemplate> <DataTemplate DataType="{x:Type igDP:GroupByRecord}"> <TextBlock Text="{Binding Path=Description}" Margin="0,3"/> </DataTemplate> <DataTemplate DataType="{x:Type igDP:ExpandableFieldRecord}"> <TextBlock Text="{Binding Path=Description}" Margin="0,3"/> </DataTemplate> <!--SSP 6/7/08 BR33580 - Added SummaryRecord data template--> <DataTemplate DataType="{x:Type igDP:SummaryRecord}"> <TextBlock Text="{Binding Path=Description}" Margin="0,3"/> </DataTemplate> </HierarchicalDataTemplate.Resources> <ContentControl Content="{Binding Path=Record}"/></HierarchicalDataTemplate>
<!-- email field --> <ContentPresenter Grid.Row="1" Grid.Column="0" TextBlock.FontWeight="Bold" VerticalAlignment="Center" ContentStringFormat="{}{0}:" Content="{Binding Path=FieldLayout.Fields[email].Label}" /> <igDP:CellValuePresenter Grid.Row="1" Grid.Column="1" Padding="0" Margin="0" BorderThickness="0" Field="{Binding Path=FieldLayout.Fields[email]}"/> </Grid> </DataTemplate> <DataTemplate DataType="{x:Type igDP:GroupByRecord}"> <TextBlock Text="{Binding Path=Description}" Margin="0,3"/> </DataTemplate> <DataTemplate DataType="{x:Type igDP:ExpandableFieldRecord}"> <TextBlock Text="{Binding Path=Description}" Margin="0,3"/> </DataTemplate> <!--SSP 6/7/08 BR33580 - Added SummaryRecord data template--> <DataTemplate DataType="{x:Type igDP:SummaryRecord}"> <TextBlock Text="{Binding Path=Description}" Margin="0,3"/> </DataTemplate> </HierarchicalDataTemplate.Resources> <ContentControl Content="{Binding Path=Record}"/></HierarchicalDataTemplate>
This was not just direction. It is entire solution.
Thank you for help.
Hello Michael,
I am just checking the progress of this issue and was wondering if you managed to achieve your goal or if you need any further assistance on the matter.
If the above suggestion helped you solve your issue please verify the thread as answered so other users may take better advantage of it.