Version

Using the MinSummaryRowHeight and DefaultSummaryRowHeight

Topic Overview

Purpose

This topic demonstrates the usage of the MinSummaryRowHeight and DefaultSummaryRowHeight properties of the UltraGrid.

Required Background

The following topics are prerequisites to understanding this topic:

Topic Purpose

The WinGrid™ displays summaries at the bottom of the row collection by default. In addition, the summaries scroll as rows are scrolled.

This topic shows you how to fix the summaries so they don’t scroll. It also describes how to show summaries at the top of the row collection rather than at the bottom.

In this topic

This topic contains the following sections:

DefaultSummaryRowHeight

Overview

The DefaultSummaryRowHeight property provides the ability to specify the default height of the summary rows. The default value is -1 which indicates that the DefaultSummaryRowHeight property will not affect the summary row height calculations. If the DefaultSummaryRowHeight property is less than the minimum height for the summary row, the minimum height will be used as the height of the summary row. If the property is set to 0, the height of the summary rows will be calculated based on the summary row contents, regardless of the value of this property on other Override levels.

Example

An example of setting the DefaultSummaryRowHeight property.

In C#:

ultraGrid1.DisplayLayout.Override.DefaultSummaryRowHeight = 40;

In Visual Basic:

UltraGrid1.DisplayLayout.Override.DefaultSummaryRowHeight = 40

MinSummaryRowHeight

Overview

By default, the minimum height of a summary row is based on the space required to display the summary contents (text, images, etc.). The MinSummaryRowHeight property provides the ability to specify the minimum height of a summary row. The default value of this property is -1 which indicates to use the calculated content size. If the properties is set to 0, an ArgumentOutOfRangeException is thrown as the row height has to be at least 1.

Example

An example of setting the MinSummaryRowHeight property.

In C#:

ultraGrid1.DisplayLayout.Override.MinSummaryRowHeight = 10;

In Visual Basic:

UltraGrid1.DisplayLayout.Override.MinSummaryRowHeight = 10

Related Content

Topics

The following topics provide additional information related to this topic.

Topic Purpose

Contains tutorials that demonstrate how to use the WinGrid control.