Essential Grid Business Intelligence
Pivot Grid Hyperlink Cell
December 21, 2011 07:00 AM by Arulraj A[Syncfusion]
Aditya
Pivot Grid Hyperlink Cell
October 17, 2011 01:56 AM
I am developing against 9.2.

I have a pivot grid that has hyperlink cells but i need to perform some custom formatting like reducing the margins etc. I managed to override the formatting by defining a Template in ValueCellStyle but then I lost the wireup to the HyperlinkCellClick event.

Is there a way to customize the formatting of the HyperLink cell without loosing the click event?



Hari Venkatesh E
[Syncfusion]
Pivot Grid Hyperlink Cell
October 19, 2011 10:37 AM
Hi,

Kindly open an incident mentioning the same query that you have posted in our forum so that we can direct you to a prompt solution. Incident can be opened through Direct-Trac Developer Support System (<http://www.syncfusion.com/Account/Logon?ReturnUrl=%2fsupport%2fdirecttrac>), were you can take advantage of the expertise of a dedicated support engineer and a guaranteed response time. Hope you will take advantage of this system as well. If you have already reported, please ignore this.

NOTE: Kindly provide us a simple sample reproducing the issue reported; this will help us investigate further.

Thanks,
E.Hari Venkatesh



Daniel Ladenheim
Pivot Grid Hyperlink Cell
December 20, 2011 05:49 PM
<Style x:Key="valStyle" TargetType="{x:Type syncfusion:PivotGridTemplateCell}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type syncfusion:PivotGridTemplateCell}" >
<TextBlock Grid.Column="0" Background="White">
<Hyperlink Click="pivotGrid2_HyperlinkCellClick"
CommandParameter="{Binding Path=Text, RelativeSource={RelativeSource TemplatedParent}}"
TargetName="ValueCell"
Foreground="Black"
TextDecorations="{x:Null}"
MouseEnter="Hyperlink_MouseEnter"
MouseLeave="Hyperlink_MouseLeave"
>
<TextBlock Text="{Binding Path=Text, RelativeSource={RelativeSource TemplatedParent}}"
TextWrapping="NoWrap"
FontSize="10"
VerticalAlignment="Center"
HorizontalAlignment="Right"
Margin="1,1,1,1"></TextBlock>
</Hyperlink>
</TextBlock>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>

now it's a hyerlink event, you have the same functionality.


Daniel Ladenheim
Pivot Grid Hyperlink Cell
December 20, 2011 05:49 PM
<Style x:Key="valStyle" TargetType="{x:Type syncfusion:PivotGridTemplateCell}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type syncfusion:PivotGridTemplateCell}" >
<TextBlock Grid.Column="0" Background="White">
<Hyperlink Click="pivotGrid2_HyperlinkCellClick"
CommandParameter="{Binding Path=Text, RelativeSource={RelativeSource TemplatedParent}}"
TargetName="ValueCell"
Foreground="Black"
TextDecorations="{x:Null}"
MouseEnter="Hyperlink_MouseEnter"
MouseLeave="Hyperlink_MouseLeave"
>
<TextBlock Text="{Binding Path=Text, RelativeSource={RelativeSource TemplatedParent}}"
TextWrapping="NoWrap"
FontSize="10"
VerticalAlignment="Center"
HorizontalAlignment="Right"
Margin="1,1,1,1"></TextBlock>
</Hyperlink>
</TextBlock>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>

now it's a hyerlink event, you have the same functionality.


Arulraj A
[Syncfusion]
Pivot Grid Hyperlink Cell
December 21, 2011 07:00 AM
Hi Daniel,

Thanks for the update.

Yes, the provided solution works fine for cell with Hyperlink and click functionality. Please let me know if you have any queries.

Regards,
Arulraj A

::adCenter::