I have a custom ad-hoc datasource that returns a GQIDateTimeColumn. We are only providing the value if the DateTime is applicable, if it’s not, we are providing “N/A” as DisplayValue.
How can this DisplayValue be used in a table component? Currently, the cell is empty when no value is provided.
DisplayValue overrides the Value, but you must still provide a valid Value even if you don’t intend to display it.
This works:
source.EventTime.HasValue
? new GQICell { Value = source.EventTime.Value.UtcDateTime }
: new GQICell { Value = default(DateTime).ToUniversalTime(), DisplayValue = “N/A” },
source.ActualStartTime.HasValue
? new GQICell { Value = source.ActualStartTime.Value.UtcDateTime }
: new GQICell { Value = default(DateTime).ToUniversalTime(), DisplayValue = “N/A”},
Kind regards,
Tom
Hi Joey,
Alternatively you could use the following custom operator that allows you to provide a fallback display value whenever no current display value is detected: http://Display Value Fallback | Catalog | dataminer.services
Note that this custom operator will run into the same issue. When using the GQI DxM, it will only work for cell values that are empty strings.
There is a bug where the DisplayValue of empty cells will be ignored if the cell Value is null. This will be fixed asap.
As you show, the workaround is indeed to use any value other than null to represent an empty/missing/unknown/undefined cell.