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.v24.2.dll
Declaration
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:
- Create a RepositoryItemAnyControl object.
- Set its RepositoryItemAnyControl.Control property to an instance of the IAnyControlEdit control.
- Assign the RepositoryItemAnyControl to a column of a container control (e.g., with the GridColumn.ColumnEdit or TreeListColumn.ColumnEdit property
- Ensure that the RepositoryItemAnyControl object is added to the container control’s repository (see EditorContainer.RepositoryItems).
Examples
- Embedded ChartControl: Chart Editor demo
- Embedded GaugeControl: Gauge Editor demo
- How to use ImageSlider as an in-place editor
- How to implement the Auto Height functionality in RepositoryItemAnyControl