Select to view content in your preferred language

ADG is blank but has values, how can that be?

814
4
Jump to solution
03-03-2014 12:59 PM
raffia
by
Deactivated User
Hi all; this is driving me nuts for three days, am sure I am not able to do it, but here it is.

Am querying all the streets in a particular area and loading all the results into an ADG. The results are all loaded, and clicking on a row zooms the map to the result BUT somehow the ADG is blank. You can see this in the app
http://www.digitaleg.com/Digital_Egypt/El-Rehab/GIS/RehabEnglish.html
click on the "Streets List" and you will get a blank ADG but you will see the scroll bars try clicking on an empty row. You can go back to the home screen by clicking the Home icon on the top right bar.

This was working before just fine, somehow it is doing this issue now. I even rolled back the API to 3.3 as it was originally to no avail.

Here is my code:

<mx:AdvancedDataGrid id="streetADG" doubleClickEnabled="true"  itemClick="zoomStreets(); > <mx:columns>                                     <mx:AdvancedDataGridColumn headerText="Street Name" dataField="StreetEname"/>                                    </mx:columns> </mx:AdvancedDataGrid>  private function launchStreetsHomeQuery():void             {                                  queryStreets.where = "StreetEname Is NOT NULL And ProjectName = 1";                     queryTaskStreets.execute(queryStreets, new AsyncResponder( zoomStreetsResults, onStreetsFault ));             }                          private function zoomStreetsResults(featureSet : FeatureSet, token : Object = null ):void             {                 var streetsArrCol:ArrayCollection = new ArrayCollection(featureSet.attributes);                                 removeDulicateEntities(streetsArrCol);                 streetADG.dataProvider = streetsArrCol;                             }                          private function zoomStreets():void             {                 myGraphicsLayer.clear();                                  for (var i : Number = 0; i < queryTaskStreets.executeLastResult.features.length; i++)                                 {                                                 if(i==streetADG.selectedIndex)                     {                         var graphic : com.esri.ags.Graphic;                           graphic = queryTaskStreets.executeLastResult.features as com.esri.ags.Graphic;                           myGraphicsLayer.symbol = slsIdentify;                                         myGraphicsLayer.add(graphic);                         switch (graphic.geometry.type)                                             {                                                                      case com.esri.ags.geometry.Geometry.POLYLINE:                                                   myMap.extent =                                    Polyline(queryTaskStreets.executeLastResult.features.geometry).extent;                                 break;                                                            }                     }                  }              }
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus
Raffi,

   OK it is just a simple issue of proper case. You need to capatalize the n in Name. In the code you pasted for the AdvancedDataGrid your itemClick was missing the ending double qoute and had a unnecessary semicolon.

    <mx:AdvancedDataGrid id="streetADG" doubleClickEnabled="true"  itemClick="zoomStreets()">         <mx:columns>                                                 <mx:AdvancedDataGridColumn headerText="Street Name" dataField="StreetEName"/>                                            </mx:columns>     </mx:AdvancedDataGrid>

View solution in original post

0 Kudos
4 Replies
RobertScheitlin__GISP
MVP Emeritus
Raffi,

   I don't see where you are specifing the outfields of the Query...
0 Kudos
raffia
by
Deactivated User
Raffi,

   I don't see where you are specifing the outfields of the Query...


Yes Robert, forgot to paste it:

<esri:QueryTask id="queryTaskStreets" url="http://arcgis4.roktech.net/arcgis/rest/services/DigitalEgypt/EGIPA_NewCairo/MapServer/8"/>       
  <esri:Query id="queryStreets"   outFields='["StreetEname", "ProjectName"]' returnGeometry="true"/>
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Raffi,

   OK it is just a simple issue of proper case. You need to capatalize the n in Name. In the code you pasted for the AdvancedDataGrid your itemClick was missing the ending double qoute and had a unnecessary semicolon.

    <mx:AdvancedDataGrid id="streetADG" doubleClickEnabled="true"  itemClick="zoomStreets()">         <mx:columns>                                                 <mx:AdvancedDataGridColumn headerText="Street Name" dataField="StreetEName"/>                                            </mx:columns>     </mx:AdvancedDataGrid>
0 Kudos
raffia
by
Deactivated User
Raffi,

   OK it is just a simple issue of proper case. You need to capatalize the n in Name. In the code you pasted for the AdvancedDataGrid your itemClick was missing the ending double qoute and had a unnecessary semicolon.

    <mx:AdvancedDataGrid id="streetADG" doubleClickEnabled="true"  itemClick="zoomStreets()">
        <mx:columns>                                    
            <mx:AdvancedDataGridColumn headerText="Street Name" dataField="StreetEName"/>                                   
        </mx:columns>
    </mx:AdvancedDataGrid>


Oh man, this is absolutely great, I feel 100 Lbs lighter, thank you very much Robert!!
0 Kudos