Version

Displaying Empty Message in WinGrid

Topic Overview

Purpose

In WinGrid™ you can display a customized message at run time indicating that the grid has no data source bound to it, is bound to a data source that contains no rows, or all rows are filtered out.

Control Configuration Summary

Control configuration summary chart

The following table lists the empty message configurable aspects of the WinGrid control.

Configurable aspects Details Properties

No Data Source Message

When no data source is defined on the WinGrid a message is displayed to notify the user

No Rows Message

When a data source is defined, but contains no rows a message is displayed to notify the user

Note
Note:

If the no visible rows message is enabled and all the rows in the grid are deleted, the no rows message will be shown.

No Visible Rows Message

When a data source is defined and it contains rows, but all rows are filtered out, a message is displayed to notify the user

The Appearance properties NoDataSourceMessageAppearance, NoRowsInDataSourceMessageAppearance, and NoVisibleRowsMessageAppearance allow further customizations that include; text alignment, background color, foreground color, fonts, images, and more.

No Data Source Message

Overview

When no data source is defined on the WinGrid control, a custom message can be displayed to notify the user.

Example

The screenshot below demonstrates how the WinGrid looks as a result of the following settings:

Property Value

True

The grid is not bound to a data source

WinGrid   Display Empty Message in WinGrid 1.png

No Rows Message

Overview

When a data source is defined, but contains no rows a customizable message can be displayed to notify the user.

Example

The screenshot below demonstrates how the WinGrid looks as a result of the following settings:

Property Value

True

The data source doesn’t contain any rows

WinGrid   Display Empty Message in WinGrid 2.png

No Visible Rows Message

Overview

When a data source is defined, contains rows, but all rows have been filtered out, a customizable message can be displayed to notify the user.

Example

The screenshot below demonstrates how the WinGrid looks as a result of the following settings:

Property Value

True

All rows have been filtered out

WinGrid   Display Empty Message in WinGrid 3.png

Related Content

Topics

The following topics provide additional information related to this topic.

Topic Purpose

This topic shows you how to add the WinGrid control to a Visual Studio .NET project and bind it to a flat data source (contains no child rows).

This topic shows you how to add the WinGrid control to a Visual Studio .NET project and bind it to a hierarchical data source (contains child rows) .