AddColumnStyleHandler Method
Registers a delegate which will provide a Style for specific properties of an Entity
Syntax
void AddColumnStyleHandler(
System.string propDefSystemName,
System.Action<Style,IEntity,PropertyDefinition,object> GetColumnStyleHandler,
System.bool clearExisting
)Sub AddColumnStyleHandler( _
ByVal propDefSystemName As System.String, _
ByVal GetColumnStyleHandler As System.Action(Of Style,IEntity,PropertyDefinition,Object), _
Optional ByVal clearExisting As System.Boolean _
) Parameters
| Name | Description |
|---|---|
| propDefSystemName | The system name of the Property Definition to provide a style for |
| GetColumnStyleHandler | The delegate which implements the function to configure the style |
| clearExisting | True if the supplied delegate should replace all existing delegates for the same Property Definition, or if it should be appended to a list. |
Example
public void GetColumnStyleDelegate(Currency.Style style, Entities.IEntity entity, Properties.PropertyDefinition propDef, object propertyValue)
{
if (propDef.SystemName.Equals("XYZ") & Convert.ToInt(propertyValue) < 0)
style.ForeColor = Color.Red;
}