Back to Devexpress

In-place Editors

windowsforms-428-controls-and-libraries-vertical-grid-data-editing-and-validation-in-place-editors.md

latest3.5 KB
Original Source

In-place Editors

  • Nov 18, 2019
  • 3 minutes to read

Vertical grid controls (VGridControl and PropertyGridControl) allow you to assign in-place editors to data cells. This is useful when you need to display different types of data (e.g. images) or to facilitate end-user input. You can use any of the editors supplied by the DevExpress Editors Library or create a custom one if none of the standard editors meet your requirements. The image below shows a sample VGridControl control with different editors assigned to each row.

To supply an in-place editor to a grid control, a specific repository item must be created. A repository item is a RepositoryItem class descendant that stores properties and events related to a specific editor. It has all the information required for creating a corresponding fully-functional editor.

Before supplying a repository item to a grid control, it must be added to an internal or external repository (repository item collections).

  • Internal Repository

  • External Repository

Refer to the Editors and Simple Controls topic for additional information.

Editors (repository items) can be assigned to row items since they correspond to data fields and thus require the same editor for all data cells. This means that you can either assign an editor to an editor row or to a multi-editor row’s item. Please refer to the Assigning Editors to Editor Rows and Assigning Editors to Multi-Editor Rows topics for information on doing this.

The vertical grid control gives you the ability to control how editor buttons are displayed. Use the VGridControlBase.ShowButtonMode property to specify whether editor buttons should always be visible, visible for the focused row, record, cell or only when editing. The VGridControlBase.ShowButtonMode property was set to ShowButtonModeEnum.ShowAlways to make the screenshot above. As you can see, editor buttons are displayed for all data cells that have editors assigned and this makes the control more representative. On the other hand, editor buttons may truncate the information displayed within cells and you may wish to disable them.

See Also

Assign Editors to Editor Rows

Assigning Editors to Multi-Editor Rows

Show and Hide Editors

Validation