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
80
Summary alignment
posted

In an effort to customize the summary row appearance to a flatter row appearance, I am modifying some content templates on DataPresenterGeneric_Express.xaml. One of my gols is to remove the summary description from each summary cell, which I accomplished Changind the property bound to the textblock marked below:

 



    <!-- _________________________ SummaryResultPresenter ______________________________________ -->
    <Style TargetType="{x:Type igDP:SummaryResultPresenter}">
        <Setter Property="Padding" Value="1,1"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type igDP:SummaryResultPresenter}">
                    <Border
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="1"
                        Padding="{TemplateBinding Padding}"
                        ToolTip="{Binding Path=SummaryResult.ToolTipResolved, RelativeSource={RelativeSource TemplatedParent}}">
                        <!-- SSP 3/19/10 - Optimizations
                            Changed the binding to bind to the new DisplayTextAsync instead of the DisplayText so we
                            don't force synchronous calculation of the summary if it's dirty.
                        -->
                        <TextBlock Text="{Binding Path=SummaryResult.ValueAsync, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}"/>
                        <!-- MF <TextBlock Text="{Binding Path=SummaryResult.DisplayTextAsync, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}"/>-->
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Margin" Value="0,0,0,2"/>
    </Style>

This may require a converter, but that is besides the point of this question.

STUFF IMPORTANT TO THIS QUESTION:

As seen on the screen shot attached, the summary is not aligned with the data on the source column.

Using .NET Inspector I could verify SummaryResult.SummaryuDefinition.Position set to Default and PositionFieldName not set.( please see attached screen shot)

According to the inline documentation found on VS object browser Default is same as UseSummaryPositionField:

UseSummaryPositionField
    Member of Infragistics.Windows.DataPresenter.SummaryPosition

Summary:
Position the summary in the summary record aligned with the field specified by the Infragistics.Windows.DataPresenter.SummaryDefinition.PositionFieldName property. If SummaryPositionField is not set then the summary will be aligned with the summary’s Infragistics.Windows.DataPresenter.SummaryDefinition.SourceFieldName.

QUESTION: Did I find a bug or what am I missing?

 

Thanks,

 

 

Please ignore the left column summary issue seen on the screenshot below. It is irrelevant to this question.

  • 30945
    Offline posted

    Hello,

     

    I am just checking if you require any further assistance on the matter.

     

    Sincerely,

    Krasimir

    Developer Support Engineer

    Infragistics

    www.infragistics.com/support 

  • 30945
    Suggested Answer
    Offline posted

    Hello Mauricio,

     

    I have been reading through your post and I have created a sample application using the style that you have provided. When I run the sample application the summary that I have added to the XamDataGrid in xaml is aligned to its source Field, unless you set the Position property of the SummaryDefinition to Left, Right or Center, which is expected.

     

    Please let me know if you can reproduce the behavior that you are describing using the attached sample or I have misunderstood you in any way.

     

     

    Looking forward to hearing from you.

     

    Sincerely,

    Krasimir

    Developer Support Engineer

    Infragistics

    www.infragistics.com/support

    SummatyAligment.zip
  • 80
    posted

    Not being able to paste the images here, even on IE. Oh well. I hope Infragistics can help. Thanks.