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?
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>
<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>
Great! I see you found an answer. If it's different from the topic I linked above, could you please include a link to the forum post that solved the problem? That way, other developers can easily find the solution too.
Hello jbarber2010,
Please refer to this help topic. I think that the section at the bottom should be useful. You can create a SummaryDisplayTemplate and display only the summary amount.
Let me know if this is not helpful, as I can forward the post to developer support.
Elizabeth AlbertLocalization Engineer
I found the answer
I found the answer to my problem on another post.