AnsweredAssumed Answered

bind ItemFileReadStore to a table td vertically

Question asked by sadanand_arc on Jun 16, 2016
Latest reply on Jun 17, 2016 by kenbuja

How to bind fetched items from ItemFileReadStore to a table td vertically not datagrid

Question asked by Sadanandachar B on Jun 16, 2016

Like • Show 0 Likes0 Comment • 0

Hi All,

         I am binding items to data grid table as shown below,

 

        function executeIdentifyTask(geom) {

            //clear the graphics layer 

            map.graphics.clear();

           // var polygonSymbol = new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID, new        esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_DOT, new dojo.Color([151, 249, 0, .80]), 3), new dojo.Color([151, 249, 0, 0.45]));

            symbol = new esri.symbol.SimpleMarkerSymbol();

            symbol.setSize(10);

            symbol.setColor(new dojo.Color([255, 255, 0]));

            identifyParams.geometry = geom.mapPoint;

            identifyParams.mapExtent = map.extent;          

            identifyTask.execute(identifyParams, function (response) {        

                var parcelItems = [];

                dojo.forEach(response, function (result) {

                    var feature = result.feature;               

                    //add selected feature to graphics layer

                    feature.setSymbol(symbol);

                    map.graphics.add(feature);

                    if (result.layerName === 'SPL_NSDI') {

                        parcelItems.push(feature.attributes);                  

                    }                

                });             

                var parcelsStore = new dojo.data.ItemFileReadStore({ data: { identifier: 'ID', items: parcelItems } });

                gridParcels.setStore(parcelsStore);

        }

--------------------------------------

  <table dojotype="dojox.grid.DataGrid" jsid="gridParcels" id="gridParcels" style="width:100%;height:100%;" selectionMode="none">                

                 <thead > 

                    <tr>                    

                      <th field="ID">ID</th>                                                                                                                                   

                      <th  field="STATION_NAME">STATION_NAME </th>

                    </tr>                                                       

                 </thead>                                      

     </table >

 

-------------------------------------------------

But how to bind the fetched items from ItemFileReadStore to table td not dojo data grid and table values should be vertical, Below is the code that how i fetched the items

  var queryObj = {};         

                var value = null;

                var staionName = null;            

                parcelsStore.fetch({

                    query:  queryObj,

                    onItem: function (item) {

                        value = (parcelsStore.getValue(item, 'ID'));

                        staionName = (parcelsStore.getValue(item, 'STATION_NAME'));

                    }

                });

           //   return value;                     

             });

Result should be like this

ID  1

STATION_NAME  Mysore

Please help on this issue..,.

Thanks!

Outcomes