Skip to main content

DXErrorProvider.CanExtend(Object) Method

Gets a value indicating whether a control can be extended.

Namespace: DevExpress.XtraEditors.DXErrorProvider

Assembly: DevExpress.XtraEditors.v23.1.dll

NuGet Package: DevExpress.Win.Navigation


public bool CanExtend(
    object extendee


Name Type Description
extendee Object

The control to be extended.


Type Description

true if the control can be extended; otherwise, false.


This method implements the CanExtend method. It indicates whether the DXErrorProvider can provide properties for specific controls.

The DXErrorProvider can associate errors with editors derived from the BaseEdit class. So, the CanExtend method returns true for BaseEdit descendants. For other controls, the DXErrorProvider doesn’t permit you to set errors, and the CanExtend method returns false.

At design time, after a DXErrorProvider object has been added to a form, editors derived from the BaseEdit class publish the ‘Error on dxErrorProivider1’ and ‘ErrorType on dxErrorProvider1’ properties. These allow you to associate an error of a specific error type, with a control. To set errors for these controls in code, use the DXErrorProvider.SetError and DXErrorProvider.SetErrorType methods.

See Also