How to set column properties (visible, label, width) in a FeatureTable displaying related records?
For example, how to turn off "ObjectID" field in this sample FeatureTable - related records | ArcGIS API for JavaScript 3.31 .
Solved! Go to Solution.
Ah, thank you Ken Buja. Now I think I understand. The related records display is by design, and is not configurable with the 3x FeatureTable dijit. The 4x FeatureTable widget (due to release soon) will have the ability to edit and configure related records later this year, so Maxim Spikin if you're able, I would consider moving to the 4x version of the ArcGIS API for JavaScript and you will be able to make these sorts of configurations in the near future. There is a bit of a hacky workaround for 3x, but it's not recommended.
Hi,
In this sample: ArcGIS API for JavaScript Sandbox
I don't see any object IDs, only the fields listed in the outfields property on line 177.
These are controlled by the outfield property, (if it's in the list then it's visible, and the label comes from the Alias of the field) documented here: FeatureTable | API Reference | ArcGIS API for JavaScript 3.31
I don't know if you can configure the width of the columns, but perhaps in the CSS you could make modifications:
FeatureTable | API Reference | ArcGIS API for JavaScript 3.31
If you click "Show" in the "groupBySummary" field, this shows the related table with the ObjectID field that Maxim wants to suppress.
Ah, thank you Ken Buja. Now I think I understand. The related records display is by design, and is not configurable with the 3x FeatureTable dijit. The 4x FeatureTable widget (due to release soon) will have the ability to edit and configure related records later this year, so Maxim Spikin if you're able, I would consider moving to the 4x version of the ArcGIS API for JavaScript and you will be able to make these sorts of configurations in the near future. There is a bit of a hacky workaround for 3x, but it's not recommended.
Thanks,
I will try the version of FeatureTable in js api 4.x