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
105
Setting appearance of SummaryValue
posted

Hello, 

Can you explain the differences between the following Appearance properties?  Reasons for using one over another? 

1. summaryValue.SummarySettings.Appearance

2. summaryValue.Appearance

3. summaryValue.SummarySettings.GroupBySummaryValueAppearance

4. summaryValue.GroupBySummaryValueAppearance

Parents
No Data
Reply
  • 469350
    Offline posted

    Hi, 

    SummarySettings is the summary definition. It defines the summary for the entire band. So when you add a summary to the grid, you use grid.DisplayLayout.Bands[x].SummarySettings.Add and create the SummarySettings. 

    SummaryValue is a specific instance of a summary. 

    If you have a flat grid with no child rows and no grouping and you have summaries that appears at the bottom of the rows collection, then you will have only once instance of the SummarySettings, and one instance of the SummaryValue. 

    But there are several ways in which a single SummarySettings can appear in more than one place (in other words, have more than one instance). If you e OutlookGroupBy then each group will have it's own summary values. If you have a summary on a child band, then each set of child rows (under each parent) will have an instance (SummaryValue) of the summary. Also, you can use the SummaryDisplayAreas property to control where the summary appears and cause it to appear in multiple places (e.g. the top of the row and also the bottom of the rows). 

    In most cases, you will probably want to use SummarySettings.Appearance, since this will give the summary a consistent appearance. For example, if you have a summary in a child band, you probably want the summary under one child row to look the same as the summaries under every other child row. This will make it easy for the user to see that this is the same summary.

    Alternately, you might want summary's appearance to be based on it's value. For example, in a financial application, you might want negative numbers to display in red and positive numbers in black. In this case, the SummarySettings.Appearance would not work, since it applies to all instances of that summary and the SummaryValue instances could have different values. In such a case, you would use the summaryValue.Appearance.

    Item's 3 and 4 on your list are just the same objects but with appearances that only apply to the Summary when it shows up inside a GroupByRow. So these only apply when you are using OutlookGroupBy and are only needed if you want the summary inside the GroupByRow to look different than the summary outside the GroupByRow. Sometimes this makes sense if the Background or border colors of the GroupByRow clash with the normal summary colors that look okay outside the GroupByRow. 

Children