views:

710

answers:

1

Hey all, I'm trying to fix the height of a Dojox 1.3 Datagrid to a single line (like Excel). The current functionality is to automatically increase the row's height when more data than will fit into a single line is available.

Is there an easy way to accomplish this? It seems like it should be built in functionality for a datagrid, conisidering that this is the default behavior for spreadsheets.

Thanks for the help

A: 

You can't set the height, but you can adjust the width. If you have a good idea how wide your cell will normally need to be in order to fit the string on one line you can set it in your < th > element to maximize the number of rows that fit onto one line.

<table //dojo grid properties>
 <thead>
  <tr>
   <th width="90px" field="fieldName" ...>
    Field Name
   </th>
   ...
  </tr>
 </thead>
</table>

Hope this helps.

Mike Carey