Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Expand]WinForms Controls
[Collapse]ASP.NET Controls and MVC Extensions
 [Expand]Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Expand]ASP.NET WebForms Controls
 [Collapse]ASP.NET MVC Extensions
  [Expand]Product Information
  [Expand]Getting Started
  [Expand]Common Concepts
  [Collapse]Grid View
    Overview - GridView
    Main Features - GridView
   [Collapse]Concepts
    [Expand]Binding to Data
    [Collapse]Data Representation Basics
     [Expand]Cells
     [Collapse]Columns
       Data Columns
       Command Column
       Band Columns
       Unbound Columns
       Fixed Columns
     [Expand]Rows
      Customization Window
    [Expand]Focus and Navigation
    [Expand]Data Editing and Validation
    [Expand]Export Overview
   [Expand]Visual Elements
   [Expand]Examples
  [Expand]Card View
  [Expand]Vertical Grid
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]HTML Editor
  [Expand]Image and Data Browsing
  [Expand]Docking and Popups
  [Expand]Navigation and Layout Extensions
  [Expand]File Management
  [Expand]Multi-Use Site Extensions
  [Expand]Charts
  [Expand]Pivot Grid
  [Expand]Scheduler
  [Expand]Tree List
  [Expand]Data Editor Extensions
  [Expand]Report Extensions
  [Expand]SpellChecker
 [Expand]Localization
 [Expand]Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[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]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Unbound Columns

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

Expanded Unbound Columns Overview

GridView 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 handling the GridViewSettings.CustomUnboundColumnData event or by specifying an expression via 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

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

  • Using an Unbound Expression

    To provide unbound columns with data using unbound expressions, compose the expression based on a specific syntax, and assign this expression to the GridViewDataColumn.UnboundExpression (via MVCxGridViewColumn.UnboundExpression) property.

    The code sample below demonstrates how to add an unbound column that retrieves its data using an unbound expression.

    Partial View code:

  • Using a Delegate Method

    To provide unbound columns with data using a delegate method, assign this delegate method to the GridViewSettings.CustomUnboundColumnData property. The delegate method assigned to this property will be called for unbound columns only.

    The code sample below demonstrates how to add an unbound column that retrieves data using a delegate method.

    Partial View code:

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

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