Attribute Table - is it possible to remove table options?

2036
2
05-07-2013 12:55 PM
DavidBoiano
Occasional Contributor
Hello,

I am new to Flex and have been developing a map for the city of Boston's water department to show the location of SSO incidents.  I have customized the map so that when you click on a feature, it will automatically zoom in to that point and therefore there isn't a need for the zoom to point link in the table options. Also, it was noted in a meeting that we would not like the "Export to csv" option to be available.  In my code I have set the exportLocation="false" under the attribute table, however the link does not gray out, and in fact if clicked, it still opens up a dialog to save the .csv file.  I'm not sure why that is.

As I do not have any use for either of the tools in the table options tab, I would like to remove that tab. I haven't seen how to do this anywhere in my research, and was hoping someone knew offhand whether or not this was even possible.

If it is not possible, can anyone provide clarification as to why the exportLocation property being set to false is not working? What is the correct outcome of this property being set to false, a grayed out link or is it removed from the table options list as an option?

FYI - I am using Flash Builder 4.7, Flex SDK 4.6 and ArcGIS Server 10.0


Any input would be much appreciated! Thank you.

David
Tags (2)
0 Kudos
2 Replies
AnthonyGiles
Frequent Contributor
David,

The exportlocation tag adds two columns to the csv file holding the location of the feature (latitude/longitude) and only applies to point features. Setting it to false just stops these two fields from being added. Looking at the source code for the widget it looks like the menu items are controlled in the attributetableskin:

http://resources.arcgis.com/en/help/flex-api/apiref/com/esri/ags/skins/AttributeTableSkin.html#optio...

Not sure how much you can change in this class though.

Regards

Anthony
0 Kudos
SarthakDatt
Occasional Contributor III
There isn't a direct way of hiding the table options button except to create a custom skin for the AttributeTable component. The easiest thing to do would be to copy the existing skin(under the skins folder) and remove the following code:

              <s:Button id="tableOptions"
                          click="tableOptions_clickHandler(event)"
                          label="{resourceManager.getString('ESRIMessages', 'attributeTableOptions')}"
                          skinClass="com.esri.ags.skins.AttributeTableOptionsButtonSkin"/>


Make sure to remove any references to tableOptions.
0 Kudos