windowsforms-devexpress-dot-xtraeditors-dot-repository-4d1f296d.md
Represents a repository item which stores settings specific to a CheckEdit control.
Namespace : DevExpress.XtraEditors.Repository
Assembly : DevExpress.XtraEditors.v25.2.dll
NuGet Package : DevExpress.Win.Navigation
[DXLicenseWinFormsEditors]
public class RepositoryItemCheckEdit :
BaseRepositoryItemCheckEdit,
IHorzAlignmentProvider
<DXLicenseWinFormsEditors>
Public Class RepositoryItemCheckEdit
Inherits BaseRepositoryItemCheckEdit
Implements IHorzAlignmentProvider
The following members return RepositoryItemCheckEdit objects:
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).
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.
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;
}
}
}
Private Sub gridView1_MouseDown(ByVal sender As Object, ByVal e As MouseEventArgs)
Dim hitInfo As GridHitInfo = gridView1.CalcHitInfo(e.Location)
If hitInfo.InRowCell Then
If TypeOf hitInfo.Column.RealColumnEdit Is RepositoryItemCheckEdit Then
gridView1.FocusedColumn = hitInfo.Column
gridView1.FocusedRowHandle = hitInfo.RowHandle
gridView1.ShowEditor()
Dim edit As CheckEdit = TryCast(gridView1.ActiveEditor, CheckEdit)
If edit Is Nothing Then
Return
End If
edit.Toggle()
DXMouseEventArgs.GetMouseArgs(e).Handled = True
End If
End If
End Sub
Object MarshalByRefObject Component DevExpress.XtraEditors.ComponentBase RepositoryItem BaseRepositoryItemCheckEdit RepositoryItemCheckEdit
See Also