[Expand]General Information
[Collapse]WinForms Controls
  .NET Core Support
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications, and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Collapse]Data Grid
   [Expand]Get Started With Data Grid and Views
   [Expand]Data Binding
    Unbound Columns
   [Expand]Data Editing and Validation
   [Expand]Filter and Search
   [Expand]Focus and Selection Handling
    Format Cell Values
   [Expand]Master-Detail Relationships
   [Expand]Asynchronous Image Load
   [Expand]Export and Printing
   [Expand]Appearance and Conditional Formatting
    Split Presentation
    Row Preview Sections
   [Expand]Batch Modifications
    Hit Information
    Popup Menus
   [Expand]Save and Restore Layout
   [Expand]Visual Elements
   [Expand]Design-Time Features
   [Expand]End-User Capabilities
    Included Components
  [Expand]Vertical Grid
  [Expand]Property Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Gantt Control
  [Expand]Chart Control
  [Expand]Map Control
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Sunburst Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com

Unbound Columns

Unbound columns are grid columns that display custom data or data calculated from other columns' values.

Expanded Foreword

Unbound columns and regular bound columns are objects of the same classes: the GridColumn, BandedGridColumn or LayoutViewColumn class. This means unbound columns fully support all column features - sorting, grouping, filtering, summaries, etc.

However, the Data Grid cannot operate without a data source, requiring you to assign one even if you only need unbound columns. For example, utilize the UnboundSource component to tell the Data Grid how many rows it should generate.

Expanded Create Unbound Columns

To add unbound columns, invoke the Data Grid Designer's "Columns" tab and click the "Add Column" button. In the property grid, set up two properties:

  • GridColumn.FieldName - must be set to a unique value that does not match any data source field name;
  • GridColumn.UnboundType - change this property's value to the type of data your column should display. Columns automatically use in-place editors that correspond to this type of data.

If you add unbound columns in code, remember to explicitly set their visibility.

Expanded Unbound Expressions

Unbound expressions allow you to calculate values of unbound columns based on other column values. Expressions are built in the Expression Editor dialog. To invoke this dialog, click the ellipsis button next to the GridColumn.UnboundExpression property in the VS Property Grid.

In code, expressions are assigned as simple strings. For instance, the code below calculates the year by subtracting values of the grid column with the "Int" field name from the current year.


Unbound columns that utilize expressions remain editable, although since cell values are calculated according to an expression, edits made by end-users are automatically discarded. It is recommended that you disable the OptionsColumn.AllowEdit setting for such columns.

Demo: Unbound Expressions

Expanded Modify Unbound Expressions at Runtime

Your end-users can right-click an unbound column's header and select "Expression Editor..." to modify the expression. You may choose whether end-users work with a legacy Editor (same one you use at design time), or its updated version that supports syntax highlighting and auto-completion.

Related API

Demo: Unbound Expressions

Expanded Editable Unbound Columns with Custom Data

Handle the ColumnView.CustomUnboundColumnData event to supply unbound columns with completely unique data, rather than data calculated by expressions. This also allows such columns to remain editable. Event arguments provide two parameters for distinguishing between retrieving and editing data.

The Unbound Columns Code Example illustrates how to retrieve data from a Dictionary and save changes back to it.

Expanded See Also

Is this topic helpful?​​​​​​​