Does MVC3 WebGrid support horizontal scrollbars?

I have a recordset that is wide enough (about 25-30 cols) ... MVC3 WebGrid supports horizontal scrollbars (or can I place the grid in the html / control tag)?

+5
source share
1 answer

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>
+10
source

All Articles