Back to Devexpress

Data Columns

aspnet-3700-components-grid-view-concepts-data-representation-basics-columns-data-columns.md

latest4.7 KB
Original Source

Data Columns

  • Jul 12, 2023
  • 3 minutes to read

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

  • Bound data columns display fields in ASPxGridView ‘s data source. Their GridViewDataColumn.FieldName properties refer to valid fields in a data source.
  • Unbound columns are not bound to any field in a data source. These columns must be populated manually. See the following help topic for more information: Unbound Columns.

There are fifteen types of server data columns.

Class NameDescription
GridViewDataBinaryImageColumnA data column used to display images from a binary stream.
GridViewDataButtonEditColumnA data column with a button editor.
GridViewDataCheckColumnA data column used to display and edit data from a Boolean data field.
GridViewDataColorEditColumnRepresents a data column used to display and edit color values.
GridViewDataComboBoxColumnA data column whose values are edited using a combo box editor.
GridViewDataDateColumnA data column used to display and edit data from a DateTime data field.
GridViewDataDropDownEditColumnRepresents a data column with an editor containing a customizable dropdown window.
GridViewDataHyperLinkColumnA data column with hyperlink functionality.
GridViewDataImageColumnA data column used to display images from specified URLs.
GridViewDataMemoColumnA data column used to display and edit memo data.
GridViewDataProgressBarColumnA data column with Progress Bar editors.
GridViewDataSpinEditColumnA data column used to display and edit numeric data.
GridViewDataTextColumnA data column used to display and edit text.
GridViewDataTimeEditColumnA data column that displays DateTime values.
GridViewDataTokenBoxColumnA data column with the token box editor.

On the client side, data columns are instances of the ASPxClientGridViewColumn objects.

Behavior

Data columns use various editors based on the data type. For example, columns with Boolean values use a check box editor, while columns with DateTime values use a DateTime editor. Use the GridViewEditDataColumn.PropertiesEdit property to access and customize the column editor’s settings.

Data columns have a set of Boolean properties that enable you to specify which elements of a column’s functionality (for example, sort, group) are available to users. Use the GridViewDataColumn.Settings property to access these options.

Set a column’s GridViewDataColumn.ReadOnly property to true to make it read-only.

You can use the Properties[EditorType] object to configure a column’s editor and filter editor on a page and in the Customization Dialog. To get a column’s editor, use the GetEditor(column) method instead of the editor’s ClientInstanceName property, since all column editors have the same client instance name.

Visibility

Use a column’s WebColumnBase.Visible property to specify its visibility. To specify its position among other visible columns, use the WebColumnBase.VisibleIndex property.

The Customization Window allows users to hide and show columns.

View Example: How to hide a grid column on the client