Select to view content in your preferred language

Problem with data grid/css

2602
2
06-06-2012 02:14 AM
PramodHarithsa1
Frequent Contributor
I have been trying to integrate different samples.
when implementing find functionality.,
though the functionality works well., I don't see the searched items fit in the grid.
and i also see two checkboxes-which i haven't defined.
This also disturbs the format of my page

How do it fit this code
  <div dojotype="dijit.layout.BorderContainer" style="width:100%;height:100%;margin:0" design="headline" gutters="true "> 
    <div class="details" dojotype="dijit.layout.BorderContainer" region="top" style="height:30px;"> 
      Risk Score: 
      <input type="text" id="searchText" value="5" /> 
      <input type="button" value="Find" onclick="execute(dojo.byId('searchText').value);"/> 
    </div> 
    <div id="map" dojotype="dijit.layout.ContentPane" region="center" style="border:1px solid #000;"></div> 
    <div dojotype="dijit.layout.ContentPane" region="left" style="width:300px;"> 
    <!--Refer to field by the position id, since the data doesn't have field 
    names--> 
    <table dojotype="dojox.grid.DataGrid" jsid="grid" id="grid" > 
      <thead> 
        <tr> 
          <th field="0" > 
            Layer Name  
          </th> 
          <th field="1" > 
            Field Name 
          </th> 
          <th field="2" > 
            Value 
          </th> 
        </tr> 
      </thead> 
    </table> 
    </div> 
   </div> 

with this so that i don't have format alteration
<body class="claro"> 
  
  <table>
  <tr><td align="center" bgcolor="#8080FF" valign="baseline" 
          colspan="2"><span class="style2"><strong>PIMS GIS Dashboard</strong></span><hr />
  </td></tr>
  <tr>
  <td class="style1">
   
      Attributes:<br />
      Area:<br />
      <input id="Area" type="text" value="-" readonly="readonly"/><br />
      Risk Score:
      <br />
      <input id="Risk_Score" type="text" readonly="readonly" /><br />
      Risk History:<br />
      <input id="Risk_History" type="text" readonly="readonly" />
      <br />
      Search
      
          
             
      <table style="width:100%;">
          <tr>
              <td class="style3">
              
                      
                 
              </td>
          </tr>
          </table>
      <table style="width:100%;">
          <tr>
              <td>
                  <input id="Radio1" checked="checked" name="Rlist" type="radio" value="V1" onclick="return Radio1_onclick()" /></td>
              <td>
                  World Imagery</td>
              <td>
                   </td>
          </tr>
          <tr>
              <td>
                  <input id="Radio2" name="Rlist" type="radio" value="V1" onclick="return Radio2_onclick()" /></td>
              <td>
                  World Street</td>
              <td>
                   </td>
          </tr>
          <tr>
              <td>
                  <input id="Radio3" name="Rlist" type="radio" value="V1" onclick="return Radio3_onclick()" /></td>
              <td>
                  World Topography</td>
              <td>
                   </td>
          </tr>
      </table>
      <br />
      
          
          <br />
          <br />


                      
          
      
      </td>
  <td>
    <div id="navToolbar" data-dojo-type="dijit.Toolbar"> 
      <div data-dojo-type="dijit.form.Button" id="zoomin"  data-dojo-props="iconClass:'zoominIcon', onClick:function(){navToolbar.activate(esri.toolbars.Navigation.ZOOM_IN);}">Zoom In</div> 
      <div data-dojo-type="dijit.form.Button" id="zoomout" data-dojo-props="iconClass:'zoomoutIcon', onClick:function(){navToolbar.activate(esri.toolbars.Navigation.ZOOM_OUT);}">Zoom Out</div> 
      <div data-dojo-type="dijit.form.Button" id="zoomfullext" data-dojo-props="iconClass:'zoomfullextIcon', onClick:function(){navToolbar.zoomToFullExtent();}">Full Extent</div> 
      <div data-dojo-type="dijit.form.Button" id="zoomprev" data-dojo-props="iconClass:'zoomprevIcon', onClick:function(){navToolbar.zoomToPrevExtent();}">Prev Extent</div> 
      <div data-dojo-type="dijit.form.Button" id="zoomnext" data-dojo-props="iconClass:'zoomnextIcon', onClick:function(){navToolbar.zoomToNextExtent();}">Next Extent</div> 
      <div data-dojo-type="dijit.form.Button" id="pan" data-dojo-props="iconClass:'panIcon', onClick:function(){navToolbar.activate(esri.toolbars.Navigation.PAN);}">Pan</div> 
      <div data-dojo-type="dijit.form.Button" id="deactivate" data-dojo-props="iconClass:'deactivateIcon' ,onClick:function(){navToolbar.deactivate();}">Deactivate</div>
      <div dojotype="dijit.layout.BorderContainer" region="top" style="height:30px;">Search Risk Score:<input type="text" id="searchText" value="5" /> 
      <input type="button" value="Find" onclick="execute(dojo.byId('searchText').value);"/></div> 
     
    </div> 
    
      <div id="map" data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region:'center'" style="width:1024px; height:512px; border:1px solid #000;">
      </div> 
         
          </td>
    </tr>

    </table>
    
  </body> 
</html> 
0 Kudos
2 Replies
SrikanthNarra
Emerging Contributor
Dear  pramodharithsa�??,

Can you please post complete code.This type of problems may rise due to improper styling of dojo elements.

some time may rise due to not writing bellow 2 lines

<link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/2.8/js/dojo/dojox/grid/resources/Grid.css">
    <link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/2.8/js/dojo/dojox/grid/resources/claroGrid.css">
0 Kudos
PramodHarithsa1
Frequent Contributor
Dear  pramodharithsa�??,

Can you please post complete code.This type of problems may rise due to improper styling of dojo elements.

some time may rise due to not writing bellow 2 lines

<link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/2.8/js/dojo/dojox/grid/resources/Grid.css">
    <link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/2.8/js/dojo/dojox/grid/resources/claroGrid.css">


I thought of the same..
I have both lines in my code.. The problem now is the grid doesn't populate the actual result but instead populates what i enter in search box
0 Kudos