GrapeCity MultiRow Windows Forms Documentation
IsValid Property (ValidateActionContext)
Example 


Gets a value that indicates whether the validation is successful.
Syntax
Public ReadOnly Property IsValid As Boolean
Dim instance As ValidateActionContext
Dim value As Boolean
 
value = instance.IsValid
public bool IsValid {get;}

Property Value

true if the validation is successful; otherwise, false.
Example
The following code example shows how to customize a CellValidator, and how to add a customized CellValidateAction. This example is part of a larger example available for the CellValidator class.
class MyIconNotifyAction : IconNotify
        {
            protected override void DoAction(ValidateActionContext context)
            {
                base.DoAction(context);
                //When the error icon pops up, a system sound plays at the same time.
                if (!context.IsValid)
                {
                    System.Media.SystemSounds.Asterisk.Play();
                }
            }
Private Class MyIconNotifyAction
        Inherits IconNotify
        Protected Overloads Overrides Sub DoAction(ByVal context As ValidateActionContext)
            MyBase.DoAction(context)
            'When the error icon pops up, a system sound plays at the same time.
            If Not context.IsValid Then
                System.Media.SystemSounds.Asterisk.Play()
            End If
        End Sub
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

Reference

ValidateActionContext Class
ValidateActionContext Members

 

 


Copyright © GrapeCity, inc. All rights reserved.