RepositoryItemAnyControl Class

Allows you to embed a ChartControl, GaugeControl or any custom control into cells of a container control (GridControl, TreeList, etc.).

Namespace: DevExpress.XtraEditors.CustomEditor

Assembly: DevExpress.XtraEditors.v20.1.dll

Declaration

[UserRepositoryItem("Register")]
public class RepositoryItemAnyControl :
    RepositoryItem
<UserRepositoryItem("Register")>
Public Class RepositoryItemAnyControl
    Inherits RepositoryItem

Remarks

The RepositoryItemAnyControl class is used to display a ChartControl, GaugeControl or any custom control within cells of a container control (GridControl, TreeList, etc.). A custom control to be embedded in a container control must implement the DevExpress.XtraEditors.CustomEditor.IAnyControlEdit interface (the ChartControl and GaugeControl implement the IAnyControlEdit interface out of the box).

This approach of embedding custom controls in containers is appropriate for static controls that do not require interaction from end-users (for instance, a chart, gauge, etc.). Embedding compound controls, including those that require end-user interaction, is not supported.

The steps to embed an IAnyControlEdit control (including the ChartControl and GaugeControl) in a container using the RepositoryItemAnyControl object are as follows:

  1. Create a RepositoryItemAnyControl object.
  2. Set its RepositoryItemAnyControl.Control property to an instance of the IAnyControlEdit control.
  3. Assign the RepositoryItemAnyControl to a column of a container control (e.g., with the GridColumn.ColumnEdit or TreeListColumn.ColumnEdit property
  4. Ensure that the RepositoryItemAnyControl object is added to the container control's repository (see EditorContainer.RepositoryItems).

Examples

Inheritance

See Also