
The GridColumn.FieldName property specifies the data source field to which the column is bound. The column displays a drop-down list that contains available values.Ī grid column used to display and edit date values.Ī grid column used to display and edit the time.Ī grid column that displays Boolean values and allows a user to change a cell value by switching between two states.Ī grid column that allows a user to edit a cell value by selecting an item from the predefined set.Ī column type that allows you to define a custom template for column cells. The column suggests values as a user types in a cell.Ī grid column used to display and edit text values.

The following column types are supported:Ī grid column used to display and edit numeric values.Ī grid column used to display and edit text values.Ī grid column used to display and edit text values. An individual column is a GridColumn class descendant that corresponds to the column’s data type. The grid stores its columns in the DataGridView.Columns collection. The AutoGenerateColumnsMode property specifies how a grid generates columns or prevents columns from automatically being generated. It automatically generates columns based on a bound data source, or you can add columns to the grid and associate them with data fields manually. The grid displays data source fields as columns. See the following help topic from the Getting Started section for details on data binding: How to: Bind Grid to Data. Note that unbound mode (add and save records directly to a grid) is not supported and the grid cannot operate without a data source.

To show data in a grid and allow users to manage it, use the DataGridView.ItemsSource property to bind the grid to a data source. The grid is bound to a collection of orders.The following members return DataGridView objects:ĭataGridView is a data-aware control that displays data in a tabular format. This example shows how to set up the grid to display the Edit Values form when a user taps a cell. This can be useful when you need to change a set of editors displayed in the form, specify a custom editor caption, or adjust editor sizes. You can define a custom template to replace the default view of the edit form. Each editor displays a caption (the column’s display name or the GridColumn.EditFormCaption property value) to the left of the edit field. Editors are arranged in a column from top to bottom. The default form contains editors for all columns visible in the grid. To customize the edit form appearance, use properties of the DataFormView object that the EditFormPage‘s Content property returns. You can specify a gesture (for example, tap or double tap) that invokes it. The grid’s EditFormPage is an edit form that allows users to edit cell values. The ShowingEditor event fires when a cell editor is about to be displayed and allows you to cancel the action. To open and close a cell in-place editor in code, use the OpenEditor and CloseEditor methods.
