I'm using the eSearch widget to allow a user to select a set of polygons. The widget then calculates a value based on the attributes from those polygons. I want the attributes and the calculated value to show up in the floating data grid. I can get the attributes and the column header for the calculated value to show up but not the calculated value. Has anyone accomplished this?
Solved! Go to Solution.
Jane,
I have not actually do this but here is how I would approach this myself. Use ObjectUtil.toString to print out the structure of gridDataProvider and then you will know the structure of what you will be adding to gridDataProvider.
Jane,
The calculated value would have to be added as an attribute of the result before the data was sent to the datagrid unless you also do the calculation there too.
Robert - thanks for your quick reply. I had tried adding it to the search result then using a set in the SearchWidgetFloatDG file. Since the dProvider function takes the attributes from the featureset in searchwidget.mxml I can't figure out how to add it to the grid provider in the dProvider function. Should I just be able to push the name:value pair for my attribute to the _data array?
Jane,
I have not actually do this but here is how I would approach this myself. Use ObjectUtil.toString to print out the structure of gridDataProvider and then you will know the structure of what you will be adding to gridDataProvider.
Robert - checking the structure of the gridDataProvider showed me that I wasn't going to be able to add this attribute by using the featureset attributes. I changed the gridDataProvider to use the graphicsLayer attributes instead. Now the new attribute shows up in the table.
Thanks for your help.
Jane