Select to view content in your preferred language

Enhanced Search Widget  - auto open datagrid

902
8
Jump to solution
10-01-2012 11:48 AM
MayJeff
Deactivated User
I downloaded seach widget from here http://www.arcgis.com/home/item.html?id=5d4995ccdb99429185dfd8d8fb2a513e.  How to auto open datagrid like the sample here (http://gis.calhouncounty.org/FlexViewer3.0/index.html?config=config-eSearch.xml&search=2&slayer=3&ex...  I try to change the auotoopendatgrid to "true" on eSeachwidget.xml but still the same.
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus
May Jeff,

   Glad you got it works, but you should mark the persons post that helped you answer your question with the green check mark (i.e. mark as the answer) and not your own unless you believe that the poster did not provide adequate help and you did answer your own question.

View solution in original post

0 Kudos
8 Replies
RobertScheitlin__GISP
MVP Emeritus
May Jeff,

   You need to read the documentation about using the Fixed datagrid. Enhanced Search Widget Fixed Datagrid Setup.pdf
0 Kudos
MayJeff
Deactivated User
Thank you for the quick reply.  Just finished setting up the datagrid but no result showed on the datagrid table after clicked the search button.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
May Jeff,

   Did you change the follow step 5 in the Enhanced Search Widget Fixed Datagrid Setup.pdf?
Do you have any fields in your eSearchWidget layer that are marked gridfield="true"?
0 Kudos
MayJeff
Deactivated User
I changed everything. Can you help me see the codes here?  Thanks.

<layers>
  <layer>
   <definitionexpression></definitionexpression>
   <enableexport>true</enableexport>
   <name>Louisville Zoning</name>
   <url>http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Louisville/LOJIC_LandRecords_Louisville/M...</url>
   <expressions>
    <expression alias="Zoning Code" textsearchlabel="Search Zoning:" isvaluerequired="false">
     <values>
      <value prompt="Example: OR1" userlist="OR1,C2,OTF,all" isvaluerequired="false">ZONING_CODE = '[value]'</value>
      <value prompt="Example: OFFICE" userlist="OFFICE,RESIDENTIAL,all"  isvaluerequired="false" operator="AND">ZONING_TYPE = '[value]'</value>
     </values>
    </expression>
    <expression alias="Zoning Type" textsearchlabel="Search Zoning Type:">
     <values>
      <value prompt="Example: RESIDENTIAL" isvaluerequired="true">upper(ZONING_TYPE) = upper('[value]')</value>
     </values>
    </expression>
    <expression alias="Zoning Name" textsearchlabel="Search Zoning Name [ Example: RES MULTI-FAMILY ]:">
     <values>
      <value prompt="Example: RES MULTI-FAMILY" isvaluerequired="true">upper(ZONING_NAME) LIKE upper('%[value]%')</value>
     </values>
    </expression>
   </expressions>
   <graphicalsearchlabel>Use one of the graphical search tools to select Zoning</graphicalsearchlabel>
   <spatialsearchlayer>true</spatialsearchlayer>
   <titlefield>ZONING_NAME</titlefield>
   <fields all="false">
     <field name="ZONING_CODE" alias="Zoning Code" gridfield="true"/>
     <field name="ZONING_NAME" alias="Zoning Name" gridfield="true"/>
     <field name="ZONING_TYPE" alias="Zoning Type" gridfield="true"/>
   </fields>
   <links/>
   <zoomscale usegeometry="true" zoompercent="2"></zoomscale>
   <autoopendatagrid>true</autoopendatagrid>
   <queryattachments>false</queryattachments>
   <relates/>
   <symbology>
    <simplefillsymbol color="0x0000ff" alpha="0.5">
     <outline color="0x00ffff" alpha="0.8" width="2" />
    </simplefillsymbol>
   </symbology>
  </layer>
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Jeff,

   That all looks good as it is the default stuff I provide with the download. What I don't see is the portion of the eSearchWidget.xml that tells the widget to use the fixed datagrid (as I mentioned earlier Step 5 of the pdf) which appears after all the layers and tables are listed.

<floatorfixed>fixed</floatorfixed><!-- possible values are fixed and float -->
0 Kudos
MayJeff
Deactivated User
Thank you very much finally get it to works. Very nice function.
The code you mentioned is inside the ocde here on eSearchWidget.xml:
<keepgraphicalsearchenabled>true</keepgraphicalsearchenabled>
<autozoomtoresults>true</autozoomtoresults>
<enabledatagridinteractionwithwidget>true</enabledatagridinteractionwithwidget>
<toleranceforpointgraphicalselection>6</toleranceforpointgraphicalselection><!-- value is in screen pixels -->
<tolerancebydefault>false</tolerancebydefault>
<spatialreference>102003</spatialreference>
<zoomscale>2400</zoomscale>
<geometryservice>http://tasks.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer</geometryservice>
<csvseparator>,</csvseparator>
<disablebuttons></disablebuttons><!--possible values one or more not all four search types comma separated text,graphic,spatial,grid,datagrid -->
<defaultselectionoption>textInput</defaultselectionoption><!--possible values only one graphicalInput or textInput or spatialInput -->
<enabledrawgraphicbutton>true</enabledrawgraphicbutton>
<enablebuffergraphicbutton>true</enablebuffergraphicbutton>
<selectedgraphicaltool></selectedgraphicaltool><!-- possible values are extent or polygon or mappoint or polyline or nothing -->
<multipartgraphicsearch>true</multipartgraphicsearch>
<floatorfixed>fixed</floatorfixed><!-- possible values are fixed and float -->
<relatetooltip>Show Relates</relatetooltip>
<relateicon>widgets/eSearch/assets/images/i_relate.png</relateicon>
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
May Jeff,

   Glad you got it works, but you should mark the persons post that helped you answer your question with the green check mark (i.e. mark as the answer) and not your own unless you believe that the poster did not provide adequate help and you did answer your own question.
0 Kudos
MayJeff
Deactivated User
Too excited and accidentally click the wrong check mark! You should get the CREDIT 🙂
0 Kudos