Class ValidationHelper
Implements validation for user input through built-in validation or events of SfDataGrid.
Inheritance
Implements
Namespace: Syncfusion.UI.Xaml.Grid
Assembly: Syncfusion.SfGrid.UWP.dll
Syntax
public class ValidationHelper : Object, IDisposable
Constructors
ValidationHelper(SfDataGrid)
Initializes a new instance of ValidationHelper class.
Declaration
public ValidationHelper(SfDataGrid datagrid)
Parameters
Type | Name | Description |
---|---|---|
SfDataGrid | datagrid | The SfDataGrid. |
Properties
ActiveGrid
Gets or sets the reference to the currently active SfDataGrid during validation.
Declaration
public static SfDataGrid ActiveGrid { get; set; }
Property Value
Type | Description |
---|---|
SfDataGrid | The reference to the currently active SfDataGrid. |
IsCurrentCellValidated
Gets or sets the value that indicates the validation status of current cell.
Declaration
public static bool IsCurrentCellValidated { get; }
Property Value
Type | Description |
---|---|
System.Boolean | Returns true if the current cell validation is successful; otherwise, false. |
IsCurrentRowValidated
Gets or sets the value that indicates the validation status of current row.
Declaration
public static bool IsCurrentRowValidated { get; }
Property Value
Type | Description |
---|---|
System.Boolean | Returns true if the current row validation is successful; otherwise, false. |
IsFocusSetBack
Gets or sets the value that indicates to prevent the CurrentCellValidating and RowValidating events to be raised more than once when click on FilterToggleButton.
Declaration
public static bool IsFocusSetBack { get; }
Property Value
Type |
---|
System.Boolean |
Remarks
If IsFocusSetBack true then end user can't move out of the current cell by Pointer pressed on GridCell. While do key navigation and click on FilterToggleButton IsFocusSetBack needs to be in false to do Validation.
Methods
Dispose()
Releases all the resources used by the ValidationHelper class.
Declaration
public void Dispose()
Dispose(Boolean)
Disposes all the resources used by the ValidationHelper class.
Declaration
protected virtual void Dispose(bool isDisposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | isDisposing | Indicates whether the call is from Dispose method or from a finalizer. |
SetCurrentCellValidated(Boolean)
Sets the ActiveGrid and IsCurrentCellValidated value.
Declaration
public void SetCurrentCellValidated(bool isCellValidated)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | isCellValidated | Indicates whether the current cell validation is successful. |
SetCurrentRowValidated(Boolean)
Sets the ActiveGrid and IsCurrentRowValidated value.
Declaration
public void SetCurrentRowValidated(bool isRowValidated)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | isRowValidated | Indicates whether the current row validation is successful. |