Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DXErrorProvider.CanExtend(Object) Method

Gets a value indicating whether a control can be extended.

Namespace: DevExpress.XtraEditors.DXErrorProvider

Assembly: DevExpress.XtraEditors.v24.2.dll

NuGet Package: DevExpress.Win.Navigation

#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