How to check-on/off All of FeatureTable's rows

1198
2
04-02-2021 12:16 PM
ShaningYu
Frequent Contributor

Refer to https://developers.arcgis.com/javascript/latest/sample-code/widgets-featuretable-map/, I loaded ESRI's FeatureTable widge into my App.  What is the way to check on/off all of the rows dynamically thruough JavaScript code?  Thanks if you can provide your hint.

Tags (2)
2 Replies
ReneRubalcava
Frequent Contributor

You can select the rows using the object ids of the source layer.

https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#selectR...

// select all rows
const oids = await featureTable.layer.queryObjectIds();
featureTable.selectRows(oids);
0 Kudos
ShaningYu
Frequent Contributor

Rene: Thanks for your response.  What's the code to add/remove All of the row?  Could you help?   

0 Kudos