I have managed to display my data in a pivot grid, now I want to prevent the user dragging the columns around - anyone know how to do this? Or at least, how to stop columns just disappearing if dragged to the wrong place!
I am using a flat DataSource as per the example given here: http://community.infragistics.com/forums/t/43319.aspx?PageIndex=2
Thanks for the quick reply, but where do I paste that code? I haven't got any template code at all so far...
Also, what is the definition of the namespave igPivot?
Here is part of my xaml file:
xmlns
:igControls="http://schemas.infragistics.com/xaml"
Hi
If you want to prevent the fields in columns/row/filter areas from deleting when they are drop inside the grid. You should retemplate the pivot grid control and remove the PivotPartType attached property. Below is extract from the template. The green box is a part of code you should remove.
<Style TargetType="igPivot:XamPivotGrid">
…
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="igPivot:XamPivotGrid">
<Border x:Name="Bd" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
<Grid x:Name="LayoutRoot" igPivot:TemplatedParentHelper.TemplatedParent="{Binding RelativeSource={RelativeSource TemplatedParent}}" igPivot:XamPivotGrid.PivotPartType="DeleteArea" Background="Transparent">
</Grid>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
Todor