Working with DataGrids

591
2
05-05-2011 01:20 PM
AndrewBrown1
Occasional Contributor II
Does anybody have any experience working with the dojox.grid.DataGrid or EnhancedGrid?

I'm trying to use the grid to display results from a selection query, or a search query, for multiple layers. However, the layers' schema differ - one is a point (soil borings), the other is a polygon (buildings). Since both differ, what is the best way to display the data in the datagrid? The column names aren't the same for both layers, so things won't work correctly. I tried searching for dynamic columns, but I couldn't find anything.

What is the best approach for something like this? Does somebody have extensive experience dealing with tables/grids with the Javascript API? Are there any real-world examples of the datagrid (not the ESRI DataGrid example)?

My application will have to display analytical data from the soil borings, so the grid/table is a necessity.

Thank you,
Andrew
0 Kudos
2 Replies
KenMorefield
Occasional Contributor
You will probably need to create a datagrid for each layer.  Then you could display them in a tabcontainer, similar to this sample:
http://help.arcgis.com/en/webapi/javascript/arcgis/demos/find/find_drilldown.html

Note that this sample utilizes HTML tables instead of dojox.data.datagrids, but the concept should still work just fine...

Ken
0 Kudos
AndrewBrown1
Occasional Contributor II
Thanks Ken.

If I have multiple tables within a tabbed container, would I have to create multiple feature layers as well? One separate feature layer per table?

Essentially, I would like to select points from multiple layers, like soil borings and wells, and then have the data populate their respective tables.
0 Kudos