Xceed Grid for WinForms v4.3 Documentation
Xceed.Validation.v1.3 Assembly / Xceed.Validation Namespace / ValidationProvider Class / SetValidationError Method
The input component to associate with the error.
The error message to be associated to the passed input component.


In This Topic
    SetValidationError Method
    In This Topic
    Sets a validation error to be displayed next to an input component, overriding all validation messages previously set by the validation provider.
    Syntax
    'Declaration
     
    Public Sub SetValidationError( _
       ByVal component As Object, _
       ByVal error As String _
    ) 
    'Usage
     
    Dim instance As ValidationProvider
    Dim component As Object
    Dim error As String
     
    instance.SetValidationError(component, error)
    public void SetValidationError( 
       object component,
       string error
    )

    Parameters

    component
    The input component to associate with the error.
    error
    The error message to be associated to the passed input component.
    Remarks
    The validation provider sets errors automatically using its validation expressions and validation message settings. Using this method to change error messages will only change the validation message and will not affect the automatic validation behavior. For Xceed.Grid.Cell components, the error description property can also be used to access the validation errors. Using this method is recommended for exceptional cases.
    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also