2

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>
Damir
  • 54,277
  • 94
  • 246
  • 365
  • The vertical scrollbar should appear if you use CSS to control the size of the enclosing HTML element correctly, the ``div`` in this case. – Fu Cheng Apr 01 '11 at 11:06

2 Answers2

2

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

Andrei
  • 4,237
  • 3
  • 25
  • 31
0

I found I could add this style to override the dojo style that might cut off anything at the bottom of the grid:

.dojoxGridContent {
    overflow: auto;
}
user2219915
  • 289
  • 3
  • 7
  • 19