Select to view content in your preferred language

Show/Hide Dojo Data Grid  - JS API

1005
3
08-25-2011 09:08 AM
JK
by
Occasional Contributor
Hello,
I have a Web tool built using and ArcGIS REST service using JS API.

The top (region) pane contains the search (findTask) box.
The center pane contains the map.
The right pane contains the data grid.

The tool works fine.  Next I'd like to add the capability to collapse and show the right region pane at will?  I'm not finding any solutions online.  Any ideas?

The pane is in a <div> tag below.

Thanks.

<div data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region:'right'" style="width:400px;">
     <table data-dojo-type="dojox.grid.DataGrid" data-dojo-id="grid"  id="grid" data-dojo-props="rowsPerPage:'50', rowSelector:'20px'">
      <thead>
        <tr>
          <th field="ST_ABBR" width="35">ST</th>
          <th field="CENTER" width="200">WC</th>
        </tr>
      </thead>
    </table>
</div>
0 Kudos
3 Replies
JK
by
Occasional Contributor
In addition I'd like it to show/hide in a east/west manner.
0 Kudos
KellyHutchins
Esri Frequent Contributor
Take a look at this sample:

http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples/exp_dragdrop.html

It uses the dojox.layout.ExpandoPane to allow users to hide/show a content pane.

In addition I'd like it to show/hide in a east/west manner.
0 Kudos
StephenLead
Regular Contributor III
Hi Kelly,

Note that the expandoPane closes "backwards" when it's placed on the right-hand side - the default ease-in and ease-out method assumes that it's placed on the left-hand side.

Any ideas how to resolve that? Not a big deal, but it would make the panel's operation more obvious.

Cheers,
Steve
0 Kudos