[Expand]General Information
[Expand]WinForms Controls
[Collapse]ASP.NET Controls and MVC Extensions
 [Expand]What's Installed
 [Expand]Common Concepts
 [Collapse]ASP.NET WebForms Controls
   Getting Started
  [Collapse]Grid View
   [Expand]Product Information
    Getting Started
    [Expand]Binding to Data
    [Collapse]Data Representation Basics
       Data Columns
       Command Columns
      [Expand]Unbound Columns
       Fixed Columns
       Accessing Columns
       Creating Columns and Binding Them to Data Fields
       Column Moving
       Column Resizing
     [Expand]Customization Window
     [Expand]Context Menu Overview
      Customization Dialog
    [Expand]Focus and Navigation
    [Expand]Data Editing
    [Expand]Data Shaping and Manipulation
    [Expand]Data Formatting
    [Expand]Master-Detail Relationship
     Appearance Customization
     Save and Restore Layout
    ASPxGridView Designer
   [Expand]Visual Elements
   [Expand]Member Tables
   [Expand]ASPxGridView - Animated Images
  [Expand]Tree List
  [Expand]Card View
  [Expand]Chart Control
  [Expand]Pivot Grid
  [Expand]Rich Text Editor
  [Expand]Site Navigation and Layout
  [Expand]HTML Editor
  [Expand]Vertical Grid
  [Expand]Data Editors
  [Expand]Docking and Popups
  [Expand]File Management
  [Expand]Data and Image Navigation
  [Expand]Multi-Use Site Controls
  [Expand]Spell Checker
  [Expand]Query Builder
 [Expand]ASP.NET MVC Extensions
 [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]Office File API
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Command Columns

End-users manipulate ASPxGridView data using command columns. ASPxGridView stores command columns together with its data columns within the ASPxGridView.Columns collection.

Expanded Commands

A command column is represented by the GridViewCommandColumn class. It provides a set of commands that allow end-users to switch ASPxGridView to edit mode, and update data, delete rows, etc.

A command column allows multiple command items to be displayed within a cell. A single command is represented by a command item. There are eight command items.

Command Description Property
New Creates a new data row. ASPxGridViewCommandButtonSettings.NewButton
Edit Switches ASPxGridView to an edit mode. ASPxGridViewCommandButtonSettings.EditButton
Delete Deletes the current data row. ASPxGridViewCommandButtonSettings.DeleteButton
Select Selects/deselects data rows. ASPxGridViewCommandButtonSettings.SelectButton, GridViewCommandColumn.ShowSelectCheckbox
Update Saves all the changes made to the current data row and switches ASPxGridView to a browse mode. ASPxGridViewCommandButtonSettings.UpdateButton
Cancel Discards any changes made to the current data row and switches ASPxGridView to a browse mode. ASPxGridViewCommandButtonSettings.CancelButton
Clear Clears the filter expression applied to ASPxGridView. ASPxGridViewCommandButtonSettings.ClearFilterButton
Recover Recovers a deleted data row. ASPxGridViewCommandButtonSettings.RecoverButton

By default, command items are represented by a link. They can also be represented by a button or image. Use the GridViewCommandColumn.ButtonType property to specify how the command column renders its command items.

To initialize individual command buttons, handle the ASPxGridView.CommandButtonInitialize event.

Expanded Behavior

End-users can move command columns among visible columns or to the Customization Window by dragging their headers. This is controlled by the column's GridViewCommandColumn.AllowDragDrop property. If this property is set to Default, the column's behavior is controlled by ASPxGridView's ASPxGridViewBehaviorSettings.AllowDragDrop option.

Expanded Custom Buttons

Command columns can also display custom buttons within command cells or filter. You can create your own buttons, and define custom actions for them. For example, see How to: Create Custom Command Buttons.

This example shows how to create and initialize a command column with custom command buttons at runtime.

To initialize individual custom command buttons, handle the ASPxGridView.CustomButtonInitialize event.

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