Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Collapse]ASP.NET Bootstrap Controls
 [Expand]Getting Started
 [Collapse]Grid View
  [Expand]Binding to Data
  [Collapse]Data Representation Basics
    Cells
   [Collapse]Columns
     Data Columns
     Command Columns
     Unbound Columns
     Accessing Columns
  [Expand]Data Summaries
  [Expand]Filtering
  [Expand]Grouping
   Sorting
  [Expand]Focus and Navigation
  [Expand]Data Editing
  [Expand]Master-Detail Relationship
   Export Overview
   Data-Toggle Attribute
 [Expand]Charts
 [Expand]Data Editors
 [Expand]Site Navigation and Layout
 [Expand]API Reference
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Unbound Columns

Bootstrap Grid View supports bound and unbound columns. Bound columns obtain their data from a control's data source. Unbound columns are not bound to any field in a data source. These columns can be populated manually by handling the ASPxGridView.CustomUnboundColumnData event or by specifying an expression using the GridViewDataColumn.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, group, display summaries and filter unbound columns in the same manner as bound columns.

An unbound column meets the following requirements.

Expanded Providing Data for Unbound Columns

Data for unbound columns is generally obtained from a custom data source or is calculated based upon the values of bound columns.

To allow data editing for an unbound column, its data should be retrieved from a custom data source. When an end-user modifies column data within the Grid View, it should then be saved back to the data source.

To provide data for unbound columns and save the changes made by end-users, handle the ASPxGridView.CustomUnboundColumnData event. This event is raised only for unbound columns.

Example

Assume that the Bootstrap Grid View is bound to an "Orders" data table (NWind database), which contains the "UnitPrice", "Quantity" and "Discount" fields. There is no field that represents the total sum, as this can be calculated manually as follows: UnitPrice*Quantity*(1-Discount). This example shows how to add an unbound column to the Grid View control to represent the total sum of an order.

The image below shows the result.

How would you rate this topic?​​​​​​​