WebGrid was never known, so I had to play with it to help with this.
Basically, if you put a webgrid inside a div with an overflow set, then it seems to work fine.
I tested it on my next code (I just squeezed a test div to simulate a small screen / many lines (it was lazy to create loads of col / properties, lol.
<div class="test" style="overflow: scroll; width: 150px">
<div style="width: 1000px">
@grid.GetHtml()
</div>
</div>
source
share