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>
1
  • 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
    Commented Apr 1, 2011 at 11:06

2 Answers 2

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

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;
}

Not the answer you're looking for? Browse other questions tagged or ask your own question.