bind ItemFileReadStore to a table td vertically

2023
2
Jump to solution
06-16-2016 11:36 PM
SadanandacharB1
New Contributor III

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!

0 Kudos
1 Solution

Accepted Solutions
SadanandacharB1
New Contributor III

i find a solution, thank you all

View solution in original post

0 Kudos
2 Replies
SadanandacharB1
New Contributor III

i find a solution, thank you all

0 Kudos
KenBuja
MVP Esteemed Contributor

Can you show your solution to help anyone else who has this question?

0 Kudos