Skip to main content

RepositoryItemCheckEdit Class

Represents a repository item which stores settings specific to a CheckEdit control.

Namespace: DevExpress.XtraEditors.Repository

Assembly: DevExpress.XtraEditors.v24.2.dll

NuGet Package: DevExpress.Win.Navigation

Declaration

public class RepositoryItemCheckEdit :
    BaseRepositoryItemCheckEdit,
    IHorzAlignmentProvider

The following members return RepositoryItemCheckEdit objects:

Remarks

The RepositoryItemCheckEdit class provides properties, methods and events appropriate to check edit controls (CheckEdit class objects). The editor’s CheckEdit.Properties property should be used to access these settings.

The RepositoryItemCheckEdit class enables you to control the editor’s look and feel, check box alignment and display style, the availability of a third “indeterminate” state, caption text, custom images to represent editor states, the manner in which the focus rectangle is displayed, values for each check state, etc. Please refer to the CheckEdit control description for details on the functionality available when using check editors.

You do not need to create repository items manually unless you have to create in-place editors for container controls (such as the XtraGrid).

Example: Change the State of a Checkbox with a Single Click (Multi-select Mode)

This example handles the MouseDown event in a Grid View so that users can change the state of a checkbox with a single click. In the example, the OptionsSelection.MultiSelectMode property is set to GridMultiSelectMode.CellSelect.

View Example

private void gridView1_MouseDown(object sender, MouseEventArgs e) {
    GridHitInfo hitInfo = gridView1.CalcHitInfo(e.Location);
    if (hitInfo.InRowCell) {
        if (hitInfo.Column.RealColumnEdit is RepositoryItemCheckEdit) {
            gridView1.FocusedColumn = hitInfo.Column;
            gridView1.FocusedRowHandle = hitInfo.RowHandle;
            gridView1.ShowEditor();
            CheckEdit edit = gridView1.ActiveEditor as CheckEdit;
            if (edit == null) return;
            edit.Toggle();
            DXMouseEventArgs.GetMouseArgs(e).Handled = true;
        }
    }
}

Inheritance

Object
MarshalByRefObject
Component
DevExpress.XtraEditors.ComponentBase
See Also