Class DataValidation
Provides methods that support data validation.
Inheritance
System.Object
DataValidation
Namespace: Syncfusion.Maui.DataGrid
Assembly: Syncfusion.Maui.DataGrid.dll
Syntax
public static class DataValidation : Object
Methods
GetPropertyValue(Object, String)
Gets the value of property.
Declaration
public static object GetPropertyValue(object obj, string propertyName)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | The object to get property value. |
System.String | propertyName | The name of property to get its value. |
Returns
Type | Description |
---|---|
System.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. |
System.String | propertyName | The propertyName. |
System.Object | dataModel | The dataModel. |
Returns
Type | Description |
---|---|
System.Boolean | 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. |
System.String | propertyName | The name of the property to validate. |
System.Object | dataModel | The data model containing the property. |
Returns
Type | Description |
---|---|
System.Boolean | true if validation found errors; false otherwise. |