I am trying to format a numeric field in a FeatureTable. The help doc says:
<Object> format Optional Use this property to format text, numeric, domain and subtype fields.
But when I use:
{
name: 'Available_Size_Sqft',
alias: 'Available Size',
format: {
"places": 3,
"digitSeparator": false
}
},
There is no change in the table.
I am using this JS API Sample FeatureTable - Formatting | ArcGIS API for JavaScript 3.18
And just adding the above code.
Solved! Go to Solution.
Hey Robert, sorry for the delayed response. I checked on this and it looks like this feature *was* slated for the 3.18 release but was removed at the last minute due to some issues with overriding localization defaults. Unfortunately, the doc was not updated to reflect this feature removal. This should be in the 3.19 release. Apologies and thanks.
Have you tried specifying a formatting function instead of the "inline" method you've shown above?
....},
{
name: 'pocphone',
alias: 'Phone #',
format: {
template: "formatPhone"
}
},....
function formatPhone(value) {
.
.
.
}
I thought I've done this using a featureTable ( I have with plain old dGrid) but I can't track down my own code..
Steve
Steve,
I tried a couple of things using a function for the template and nothing worked.
Hey Robert, sorry for the delayed response. I checked on this and it looks like this feature *was* slated for the 3.18 release but was removed at the last minute due to some issues with overriding localization defaults. Unfortunately, the doc was not updated to reflect this feature removal. This should be in the 3.19 release. Apologies and thanks.