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

Data Columns

Data Columns are used to display and edit data. GridView supports both bound and unbound data columns.

  • Bound data columns represent fields in the GridView's data source (Data Model). Each column's GridViewDataColumn.FieldName (via MVCxGridViewColumn.FieldName) property refers to a valid field in a data source.
  • Unbound columns are not bound to any field in a data source. These columns must be populated manually. For information, see the Unbound Columns topic.

There are fifteen types of data columns. You can define the column type using the MVCxGridViewColumn.ColumnType property, which receives one of the MVCxGridViewColumnType enumeration values. The table below lists the GridView column types, and the default editors used to edit and display values in these column types.

Enum Field Description Values are Edited with Values are Displayed with
MVCxGridViewColumnType.BinaryImage Indicates that a binary image editor is used to display column values. Values are read-only BinaryImage
MVCxGridViewColumnType.ButtonEdit Indicates that a button editor is used to edit column values. ButtonEdit Plain text
MVCxGridViewColumnType.CheckBox Indicates that a check box is used to edit and display column values. CheckBox CheckBox
MVCxGridViewColumnType.ColorEdit Indicates that a color editor is used to edit column values. ColorEdit Color Indicator with plain text
MVCxGridViewColumnType.ComboBox Indicates that a combo box is used to edit column values. ComboBox Plain text
MVCxGridViewColumnType.DateEdit Indicates that a date editor is used to edit column values. DateEdit Plain text
MVCxGridViewColumnType.DropDownEdit Indicates that a drop down editor is used to edit column values. DropDownEdit Plain text
MVCxGridViewColumnType.HyperLink Indicates that a hyperlink editor is used to display column values. TextBox HyperLink
MVCxGridViewColumnType.Image Indicates that an image editor is used to display column values. Values are read-only Image
MVCxGridViewColumnType.Memo Indicates that a memo editor is used to edit column values. Memo Plain text
MVCxGridViewColumnType.ProgressBar Indicates that a progress bar is used to visualize column values. SpinEdit ProgressBar
MVCxGridViewColumnType.SpinEdit Indicates that a spin editor is used to edit column values. SpinEdit Plain text
MVCxGridViewColumnType.TextBox Indicates that a text box is used to edit column values. TextBox Plain text
MVCxGridViewColumnType.TimeEdit Indicates that a time editor is used to edit column values. TimeEdit Plain text
MVCxGridViewColumnType.TokenBox Indicates that a token box is used to edit column values. TokenBox Plain text

On the client, data columns are represented by ASPxClientGridViewColumn objects.

Expanded Behavior

Since different types of data columns present different types of data, they provide their own editors. For example, Boolean values are edited using a check box editor, while DateTime values are edited using a DateTime editor. To access and customize the column editor's settings, use the GridViewEditDataColumn.PropertiesEdit (via MVCxGridViewColumn.PropertiesEdit) property.

Data columns provide a set of Boolean properties that enable you to specify which elements of a column's functionality (sorting, grouping, etc.) are available to end-users. These options can be accessed via the GridViewDataColumn.Settings (via MVCxGridViewColumn.Settings) property.

To make a column read-only, set its GridViewDataColumn.ReadOnly property to true.

The code sample below demonstrates how to add a read-only data column, change columns settings, and change the built-in data editor settings.

Expanded Visibility

The column's visibility is specified by its WebColumnBase.Visible property. Its position among other visible columns is specified by its WebColumnBase.VisibleIndex property.

End-users can hide and show columns via the Customization Window.

Expanded See Also

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