Back to Devexpress

Unbound Columns

aspnetmvc-115075-components-card-view-data-representation-basics-unbound-columns.md

latest2.1 KB
Original Source

Unbound Columns

  • Feb 02, 2023
  • 3 minutes to read

This topic describes the main concepts of using unbound columns within the CardView extension.

Unbound Columns Overview

CardView supports both bound and unbound columns. Bound columns obtain their data from a data source. Unbound columns are not bound to any field in a data source. These columns can be populated manually by using the CardViewSettings.CustomUnboundColumnData delegate or by specifying an expression via the CardViewColumn.UnboundExpression used to evaluate values for this field. The Expressions section describes the syntax for creating expressions.

There is no difference between working with bound and unbound columns. You can sort, display summaries and filter unbound columns in the same manner as bound columns.

An unbound column has the following requirements.

  • Its CardViewColumn.FieldName property must be set to a unique value and not refer to any field in the CardView ‘s data source.
  • The column’s CardViewColumn.UnboundType property must be set to an appropriate value based on the type of data the column is supposed to display (Boolean, DateTime, Decimal, Integer, String, Object). It should not be set to UnboundColumnType.Bound.

Providing Data for Unbound Columns

ASP.NET MVC CardView provides two approaches to generate data for unbound columns.

  • Using an Unbound Expression

  • Using a Delegate Method

Note

When the CardView extension is bound to a data source in Database Server Mode, you can only enable sorting, filtering and summary calculation for unbound columns that are populated with unbound expressions.

See Also

Card View