Select to view content in your preferred language

updating dojo grid with javascript

740
1
01-20-2014 05:50 AM
PaulEast
Deactivated User
I am trying to create a javascript page to display a map.

The problem is concerned with updating a dojo grid. I have ran this through the chrome debugger and it crashed when the below code is ran. The Mystore object is creating correctly I can look into it in the debugger and I can see all of the data in it.

    myGrid.setStore(myStore); 


is not updating the table

[HTML]
<table dojotype="dojox.grid.DataGrid" jsid="myGrid" noDataMessage="No results found in the current map extent" style="width:100%;height:100%;" selectionMode="none">
                    <thead>
                        <tr>
                        <th field="NAME" width=75%>Neighborhood</th>       
                        <th field="ownPct" width=25%>% Own</th>                                
                        </tr>
                    </thead>
                    </table>
[/HTML]

I am using the links

    <link rel="stylesheet" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.3/js/dojo/dijit/themes/Nihilo/Nihilo.css"/>
    <link rel="stylesheet" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.3/js/esri/css/esri.css"/>
    <link rel="stylesheet" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.3/js/dojo/dojox/grid/resources/grid.css"/>
        <script src="http://serverapi.arcgisonline.com/jsapi/arcgis/3.8/"></script> 


I have uploaded the full page attached

Hope you can help
0 Kudos
1 Reply
JonathanUihlein
Esri Regular Contributor
Hey Paul,

Before I spend time troubleshooting this... have you thought about using dgrid?

http://dojofoundation.org/packages/dgrid/

It's written by the DOJO folks and also included in the Esri JSAPI.

I strongly recommend dgrid because it is easier to implement, maintain and even troubleshoot if needed (compared to dojox datagrid).
0 Kudos