Fog Creek Software
Discussion Board




Welcome! and rules

Joel on Software

Datagrid creates TALLLLL rows

How do I stop Datagrid from increasing height of a few rows to fill the datagrid which is set for many rows?

thanks,
earlofroberts

Ed Roberts
Tuesday, August 19, 2003

Display less data?

Brad Wilson (dotnetguy.techieswithcats.com)
Tuesday, August 19, 2003

Try using the overflow CSS attribute on a <div> or something (doesn't work on <table> elements)
e.g:
<table>
  <tr>
      <td>
        <div style="overflow:hidden; height:1em">
            blah blah blah blah blah blah blah blah blah blah
            blah blah blah blah blah blah blah blah blah blah
            blah blah blah blah blah blah blah blah blah blah
        </div>
      </td>
      ...
  </tr>
  ...
</table>
"overflow:hidden" truncates your content as rendered (it's got to do something)

If you meant to say "I want to stop line breaks" use the "whitespace:nowrap" CSS attribute or <nobr></nobr> tags.

Duncan Smart
Wednesday, August 20, 2003

Thanks for the help.  I really want the datagrid to reduce its' pagesize to fit the number of actual rows if there are fewer actual rows than pagesize.

earlofroberts

Ed Roberts
Wednesday, August 20, 2003

Clear as mud.

Duncan Smart
Wednesday, August 20, 2003

*  Recent Topics

*  Fog Creek Home