Hi,
I need to achieve the balloontooltip when i mouseover on particular cell.
How i achieve the same through cellvaluepresenterstyle ?
I am using xamDatagrid of 12.2 version.
Could any one can help me to achieve my requirement?
Thanks
Hello Chandra,
The following style will show a tooltip with the cell's value itself when hovering over any cell in the XamDataGrid:
<Style TargetType="ig:CellValuePresenter" >
<Setter Property="ToolTip" Value="{Binding RelativeSource={RelativeSource Self}, Path=Value}" />
</Style>
However, if the tootip is necessary on a specific field only, you may add a key to the style, then apply it to the desired field through the CellValuePresenterStyle property of FieldSettings object, e.g.:
<Style TargetType="ig:CellValuePresenter" x:Key="toolTipStyle">
...
<ig:FieldSettings CellValuePresenterStyle="{StaticResource toolTipStyle}" />
If you need any further assistance please do not hesitate to ask.
Hi Galina,
Thanks for your reply.
Actually, I am looking for BalloonTooltip(ToolTip with Balloon Style) which i need to apply for CellValuePresenter.
Can help me , how can i achieve the BallonToolTip?
Thanks in advance
Hi Chandra,
Please find attached a sample application where I modified the 2 styles you sent before so that the tooltip template is set via the corresponding setter of the TextCellStyle.
If this solution is not helpful, could you, please provide some more details of how your styles are organized, how you apply them and what controls they have to be applied on.
Thanks.
I am still following your case. I'm just checking if the provided solution was helpful or whether you need any further assistance on the matter.
Thanks for your email..
Yes...Still i need your assistance.
i have modified your solution, when i tried keep mouse cursor on cell, it should show the value of cell
But in this case, its showing only 1st column cell value.
I made some amendments to the 2 styles in order to achieve your goal – please refer to the attached sample application for details.
Another way to go is leaving the tooltip control template as it was, but instead of adding a setter for the tooltip directly to the CellValuePresenter style, the tooltip should be added to the Control template of the CellValuePresenter, e.g.:
<Style x:Key="TextCellStyle" TargetType="{x:Type igDP:CellValuePresenter}">
<Setter Property="VerticalContentAlignment" Value="Top"/>
<!--<Setter Property="ToolTip" Value="{Binding RelativeSource={RelativeSource Self}, Path=Value}">
</Setter>-->
<Setter Property="Template">
<Setter.Value>
<ControlTemplate>
<!--<Border CornerRadius="2" Name="MainBorder1" BorderThickness="2" BorderBrush="{Binding Converter={StaticResource testconv}, RelativeSource={RelativeSource AncestorType={x:Type igDP:CellValuePresenter}}}">-->
<Border CornerRadius="2" Name="MainBorder1" BorderThickness="2" >
<Border.ToolTip>
<ToolTip Template="{StaticResource tooltiptemplate}" />
</Border.ToolTip>
<StackPanel Orientation="Horizontal">
<TextBox Text="{Binding RelativeSource={RelativeSource AncestorType={x:Type igDP:CellValuePresenter}}, Path=Value}" />
<Image x:Name="Image1" >
</Image>
</StackPanel>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
Please let me know if you need there’s something else I can assist with.
Regards,
Galina
Principal Software Engineer in Test
Infragistics Inc.
www.infragistics.com
Thanks for your help..
It's helped me in some extent to achieve my requirement.
Thanks once again..
I'm glad to hear I was helpful. Please let me know if you require any further assistance.