How to add vertical scrollbar to dojox.grid.DataGrid?

Damir picture Damir · Apr 1, 2011 · Viewed 7.9k times · Source

How to add vertical scrollbar to dojox.grid.DataGrid ?

<div id="system_status" >
                    <div dojoType="dojo.data.ItemFileReadStore" jsId="system_flags"    data="window.store_data_system_flags"> </div> 
                    <div id="grid"  dojoType="dojox.grid.DataGrid" store="system_flags"   structure="window.layout_system_flags" queryOptions="{deep:true}" query="{}" clientSort="true" rowsPerPage="10"> </div>
                </div>

Answer

Andrei picture Andrei · Apr 1, 2011

Just set CSS "height" style for div with id "system_status" and if the grid will need more space than scrollbar will appear automatically.

<div id="system_status" style="height:200px" >
                    <div dojoType="dojo.data.ItemFileReadStore" jsId="system_flags"    data="window.store_data_system_flags"> </div> 
                    <div id="grid"  dojoType="dojox.grid.DataGrid" store="system_flags"   structure="window.layout_system_flags" queryOptions="{deep:true}" query="{}" clientSort="true" rowsPerPage="10"> </div>
                </div>

dojo-grid-styling