Class CellUtils
utility functions for transforming cells
Inheritance
Inherited Members
Namespace: TimeCockpit.Data.DataModel.View
Assembly: TimeCockpit.Data.dll
Syntax
public static class CellUtils
Methods
DerivePropertyOrRelationFromCell(IDataContext, BoundCell, out ModelProperty, out Relation)
Dervies the property or relation from the a cell.
Declaration
public static bool DerivePropertyOrRelationFromCell(IDataContext dataContext, BoundCell cell, out ModelProperty property, out Relation relation)
Parameters
Type | Name | Description |
---|---|---|
IDataContext | dataContext | The data context to use. |
BoundCell | cell | A derived instance of bound cell. |
ModelProperty | property | The property derived from the bound cell, or null if it is a relation cell. |
Relation | relation | The relation dervied from the bound cell, or null if it is not a relation cell. |
Returns
Type | Description |
---|---|
System.Boolean | Returns true if a relation or a property can be derived. |
DeriveSpecificCellType(BoundCell, ModelProperty, RelationBase)
Derives the type of the specific cell.
Declaration
public static BoundCell DeriveSpecificCellType(BoundCell cell, ModelProperty modelProperty, RelationBase relation)
Parameters
Type | Name | Description |
---|---|---|
BoundCell | cell | The original cell. |
ModelProperty | modelProperty | The model property to build a cell for. |
RelationBase | relation | The relation to build the cell for. |
Returns
Type | Description |
---|---|
BoundCell | returns a more specific bound cell representing the type of the property. |
DervicePropertyFromClrType(Type)
Derives a model property from a clr data type.
Declaration
public static ModelProperty DervicePropertyFromClrType(Type dataType)
Parameters
Type | Name | Description |
---|---|---|
System.Type | dataType | the clr type to derive a type from. |
Returns
Type | Description |
---|---|
ModelProperty | returns the model property. |
EvaluateBooleanExpression(IDataContext, String)
Evaluates a boolean expression.
Declaration
public static bool EvaluateBooleanExpression(IDataContext dataContext, string expression)
Parameters
Type | Name | Description |
---|---|---|
IDataContext | dataContext | The data context to use. |
System.String | expression | The FilterIsMandatory expression. |
Returns
Type | Description |
---|---|
System.Boolean | Returns the visibility of the cell. |
PrepareFileCell(FileCell, FileProperty)
Prepares the file cell and file property.
Declaration
public static void PrepareFileCell(FileCell fileCell, FileProperty fileProperty)
Parameters
Type | Name | Description |
---|---|---|
FileCell | fileCell | The file cell to prepare. |
FileProperty | fileProperty | The file property represented by the file cell. |