AnsweredAssumed Answered

dojo Data grid not display data

Question asked by Nadir_Hussain on Apr 15, 2015
Latest reply on Apr 15, 2015 by Yusufamro

HTML CODE

<table data-dojo-type="dojox.grid.DataGrid"  id="grid" selectionMode="none" style="height:96%;width:96%;margin:5px; border:4px solid black;">

                                         <thead>

                                            <tr>

                                                <th field="ObjectID"  width="50px">

                                                    <img alt="+" src="Images/nav_zoomin1.png"/>

                                                </th>

                                                <th field="SIREN_NO" width="100px">Siren Number</th>

                                                <th field="Reg_E" width="200px">Region English</th>

                                            </tr>

                                        </thead>

  </table>

 

JAVA SCRIPT CODE

 

function executeQueryTask(strRegionName, strCityName, intCondition) {

                   var items = []; //all items to be stored in data store

                   var featureAttributes;

                   var inti = 0;

                   var queryTask = new esri.tasks.QueryTask("http://dell-pc/ArcGIS/rest/services/SirenFeatureService/MapServer/3");

                   var query = new esri.tasks.Query();

                   query.returnGeometry = true;

                   query.outFields = ["SIREN_NO", "Reg_E", "ObjectID"];

                   if (intCondition == 0)

                     query.where = "1=1";

                  else if (intCondition == 1)

                     query.where = "Reg_A=" + strRegionName + "  " + "And" + "   " + "City_A=" + strCityName;

                     queryTask.execute(query, function (results) {

                      for (var i =0; i < results.features.length; i++) {

                         featureAttributes = results.features[i].attributes;

                         items.push(featureAttributes);

                         }

                         var memStore = new Memory({data: items,idProperty: "ObjectID"});

                     window.grid.set("store", memStore);

                     window.grid.set("sort", "Reg_A");

                      });

                }

i have check my code works and fullfill items array.but i think the problem starts from the red lines.please help why grid is not showing data.thanks for help

Outcomes