Telerik UI for Windows Phone by Progress

RadDataBoundListBox provides out-of-the-box functionality for handling cases when no data is available for the control. The following properties can be used to utilize these features:

  • EmptyContent
  • EmptyContentTemplate

EmptyContent and EmptyContentTemplate

It is sometimes useful to give a hint to the end-user that RadDataBoundListBox has nothing to display. This may happen when the end-user has made a search inquiry or has filtered out the data in any way. The EmptyContent and EmptyContentTemplate properties exposed by RadDataBoundListBox can be used in such scenarios.

The content and its template defined by these properties are displayed each time the data source used to populate the RadDataBoundListBox is empty or there is no data source at all (i.e. the ItemsSource property is set to null).

EmptyContentDisplayMode

The EmptyContentDisplayMode property can be used to define when the empty content defined by the EmptyContent and EmptyContentTemplate properties will be displayed. This property accepts values from the EmptyContentDisplayMode enumeration. Following values are possible:

  • Always
  • DataSourceEmpty
  • DataSourceNull

When this property is set to Always, the empty content is displayed when there is no items source or when there is an empty items source.

When this property is set to DataSourceEmpty, the empty content is displayed only when there is an empty data source attached to the control.

When this property is set to DataSourceNull, the empty content is displayed only when there is no data source attached to the control.