Hi All,
Can anyone help me in aliging the summary with the content in the column?
column A Column B
100 200
sun 100 sum 200
Thanks
Prakash
Hello Prakash,
You have to create a style for the summary presenter. You can find this default style in the DefaultStyles directory in the infragistics folder on your computer.
Hope this helps,Alex.
Hi Alex,
Here is code which i did.
But it does not align with the column value but it aligns with the column.
I want to make it aligned with the content of the column.
Let me know how to do that ?
<Style TargetType="{x:Type igDP:SummaryResultPresenter
}">
<Setter Property="HorizontalAlignment" Value
="Right"/>
<Setter Property="HorizontalContentAlignment" Value="Right"/>
</Style
>
<Style TargetType="{x:Type igDP:SummaryCellPresenter
<Setter Property="HorizontalContentAlignment" Value
<Style TargetType="{x:Type igDP:SummaryRecordPresenter
I have tried that it works perfectly but it does not align correctly with the content of the field.
I have attached a gif file it show's the results in the grid with the summary
Prakash,
I am not quite sure why they are not aligned. It seems to me that they are centered. Here is a screenshot of what I am getting:
I am also attaching the sample project for you.
Regards,
Alex.
This is the code which i am using to right align the summary content but it doesnot work
Do you know if i am missing anything in the code.
<Style TargetType="{x:Type igDP:SummaryResultPresenter}">
<Setter Property="HorizontalAlignment" Value="{Binding Path=SummaryResult.SourceField.EditAsTypeResolved, RelativeSource={RelativeSource Self}, Converter={StaticResource typeToHorzAlignment}}" />
</Style>
="BottomFixed"/>
="SingleView" >
<igDP:FieldLayout.SummaryDefinitions>
="Sum"/>
</igDP:FieldLayout.SummaryDefinitions>
</igDP:FieldLayout>
hi Alex,
Its working Perfectly.
Hi, in case someone's struggling with nullables I suggest to modify the convert method in the example above with something like the following:
public object Convert(.......){ Type innerType; Type t = value as Type; bool gen = t.IsGenericType; if (gen) { innerType = t.GetGenericArguments()[0]; } else { innerType = t; } if (innerType != null && Utilities.IsNumericType(innerType)) { return ......; } else return ........;