Skip to main content
A newer version of this page is available. .

DXErrorProvider.CanExtend(Object) Method

Gets a value indicating whether a control can be extended.

Namespace: DevExpress.XtraEditors.DXErrorProvider

Assembly: DevExpress.XtraEditors.v18.2.dll

Declaration

public bool CanExtend(
    object extendee
)

Parameters

Name Type Description
extendee Object

The control to be extended.

Returns

Type Description
Boolean

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

Remarks

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