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
590
XamWebGrid Totals
posted

If you see my screen shot below.  I am using SummaryRow, but by default it puts "Sum =".  In my example I customized it, but I really want it to just show the total amount with out any text.  Is there any way do this in XAML? 

Parents Reply
  • 590
    posted in reply to Elizabeth Albert

    http://forums.infragistics.com/forums/p/37289/216379.aspx

    App.xaml

    <igPrim:SummaryResultFormatStringValueConverter x:Key="SDFormatStringConverter"></igPrim:SummaryResultFormatStringValueConverter>
    <Style TargetType="igPrim:SummaryRowCellControl"  x:Key="CustomSummaryStyle">
            <Setter Property="FontSize" Value="11" />
            <Setter Property="VerticalContentAlignment" Value="Center" />
            <Setter Property="HorizontalContentAlignment" Value="Right"/>
            <Setter Property="Background" Value="{StaticResource SummaryRowBackgroundBrush}"/>
            <Setter Property="BorderBrush" Value="{StaticResource CellItemNormalBorderBrush}"/>
            <Setter Property="BorderThickness" Value="0,0,1,0"/>
            <Setter Property="Padding" Value="7,3"/>
            <Setter Property="SummaryDisplayTemplate">
                <Setter.Value>
                    <DataTemplate>
                        <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
                            <TextBlock Text="{Binding SummaryDefinition.SummaryOperand.RowDisplayLabel}" />
                            <!--Remove this element-->
                            <!--<TextBlock Text=" = "/>-->
                            <TextBlock Text="{Binding Converter={StaticResource SDFormatStringConverter}}"/>
                        </StackPanel>
                    </DataTemplate>
                </Setter.Value>
            </Setter>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="igPrim:SummaryRowCellControl">
                        <Grid>
                            <vsm:VisualStateManager.VisualStateGroups>
                                <vsm:VisualStateGroup x:Name="CommonStates">
                                    <vsm:VisualState x:Name="Normal" />
                                    <vsm:VisualState x:Name="MouseOver"/>
                                    <vsm:VisualState x:Name="Alternate" />
                                </vsm:VisualStateGroup>
                                <vsm:VisualStateGroup x:Name="SelectedStates">
                                    <vsm:VisualState x:Name="NotSelected"/>
                                    <vsm:VisualState x:Name="Selected"/>
                                </vsm:VisualStateGroup>
                                <vsm:VisualStateGroup x:Name="ActiveStates">
                                    <vsm:VisualState x:Name="InActive" />
                                    <vsm:VisualState x:Name="Active">
                                        <Storyboard >
                                            <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00" Storyboard.TargetName="ActiveRect" Storyboard.TargetProperty="(UIElement.Visibility)">
                                                <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="Visible"/>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </vsm:VisualState>
                                </vsm:VisualStateGroup>
                                <vsm:VisualStateGroup x:Name="FixedStates">
                                    <vsm:VisualState x:Name="Fixed"/>
                                    <vsm:VisualState x:Name="Unfixed"/>
                                </vsm:VisualStateGroup>
                            </vsm:VisualStateManager.VisualStateGroups>
                            <Border x:Name="AddNewRowElem" Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}">
                                <Rectangle Height="1" VerticalAlignment="Top" Fill="#7FFFFFFF"/>
                            </Border>
                            <Rectangle Fill="Transparent" Stroke="{StaticResource CellItemSelectedBorderBrush}" StrokeThickness="1" x:Name="ActiveRect" Visibility="Collapsed"></Rectangle>
                            <StackPanel x:Name="SummaryDisplay" HorizontalAlignment="Right" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}"/>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    UserControl
                        <igGrid:XamWebGrid.SummaryRowSettings>
                            <igGrid:SummaryRowSettings Style="{StaticResource CustomSummaryStyle}"  AllowSummaryRow="Bottom"></igGrid:SummaryRowSettings>
                        </igGrid:XamWebGrid.SummaryRowSettings>
Children
No Data