As part of Configuring Grids in DPE Web Applications, the Converter key converts metadata into usable values. For example, "MsToDuration" transforms a time in ms to a time format determined in the ConverterParameter. Please see a list of converter values below. 

Converter

Description

DateToString

This converter is used to display a specific date/time field

Requires a suitable ConverterParameter configuration

OffsetDateToStringConverterConverts a DateTimeOffset to the format specified in ConverterParameters.

FileSizeConverter

Translates a byte size into KB, MB, GB, etc.

1024 bytes are treated as 1 KB, 1024 KB are treated as 1 MB, ...

IntToCheckedConverter

A value 0 will be converted to a string containing a space, A value 1 will be converted to a string checked='checked'. Can be used together with checkbox controls.

MsToDuration

Converts milliseconds into the configured time format (e.g. 70000 ms into 1:10 minutes)

Requires a suitable ConverterParameter configuration

DurationToMsConverterConverts duration into milliseconds
IntToStringConverter

For an integer input value N the Nth string element in a comma-separated list is returned. The string list is specified in ConverterParameter.

Example for ConverterParameter:

Zero,One,Two,Three
CODE

Conversion Result:

InputOutput
0Zero
1One
2Two
3Three
44

In addition this converter maps boolean input values to 0 (false) and 1 (true) and their respective converted output value:

InputOutput
falseZero
trueOne
StringToStringConverter

For a string input value the matching mapping to another string value is returned. String mappings are specified in ConverterParameter.

Example for ConverterParameter:

Existing=,Recording=red,Virtual=yellow
CODE

Conversion Result:

InputOutput
Existing
Recordingred
Virtualyellow
Other valuesKeep their value


Using the pseudo-value $default$ it is also possible to specify a default value:

Existing=,Recording=red,Virtual=yellow,$default$=green
CODE

Conversion Result:

InputOutput
Existing
Recordingred
Virtualyellow
Other valuesgreen


Another option is to redefine the special characters which are used to structure the mapping: = and ,

Redefine the = and , characters by preceding your ConverterParameter string with a text like $$$,=$$$

$$$|_$$$Existing_|Recording_red|Virtual_yellow
CODE
ProgressConverter

Displays a progress bar additionally to the usual status in percentage (%)

Requires a suitable Cell Template configuration.

SafModuleStateConverter

Shows background color for SAF module state. Requires a Cell Template Content configuration.

At the moment it is not configurable. By default the values are: Started = green, Scheduled = orange, Failed = red, Cancelled = grey

SafServerStateConverter

Shows background color for SAF server state.

Requires a Cell Template Content configuration.

WorkflowStateConverter

Shows background color for workflow server state.

Requires a Cell Template Content configuration.

AutoFormatConverter
FormatToSdHdConverter