Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
184
xamPivotGrid
posted

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

Parents
No Data
Reply
  • 7922
    posted

    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>

                            </Grid>

                        </Border>

                    </ControlTemplate>

                </Setter.Value>

            </Setter>

        </Style>

     

     

    Todor

Children