Class DataValidation
Provides methods that support data validation.
Inherited Members
Namespace: Syncfusion.Maui.DataGrid
Assembly: Syncfusion.Maui.DataGrid.dll
Syntax
public static class DataValidation
Methods
GetPropertyValue(object?, string)
Gets the value of property.
Declaration
[RequiresUnreferencedCode("The GetPropertyValue method is not trim compatible")]
public static object? GetPropertyValue(object? obj, string propertyName)
Parameters
| Type | Name | Description |
|---|---|---|
| object | obj | The object to get property value. |
| string | propertyName | The name of property to get its value. |
Returns
| Type | Description |
|---|---|
| object | Returns the corresponding property value. |
Validate(DataGridCell, string, object)
Validates the value of current cell.
Declaration
public static bool Validate(DataGridCell currentCell, string propertyName, object dataModel)
Parameters
| Type | Name | Description |
|---|---|---|
| DataGridCell | currentCell | The current cell that is to validated. |
| string | propertyName | The propertyName. |
| object | dataModel | The dataModel. |
Returns
| Type | Description |
|---|---|
| bool | true if the validation is successful; otherwise, false. |
ValidateWithIDataErrorInfo(DataGridCell, string, object)
Validates a property using the IDataErrorInfo interface.
Declaration
public static bool ValidateWithIDataErrorInfo(DataGridCell currentCell, string propertyName, object dataModel)
Parameters
| Type | Name | Description |
|---|---|---|
| DataGridCell | currentCell | The cell to validate. |
| string | propertyName | The name of the property to validate. |
| object | dataModel | The data model containing the property. |
Returns
| Type | Description |
|---|---|
| bool | true if validation found errors; false otherwise. |