Does MVC3 WebGrid support horizontal scrollbars?

I have a record set that is quite wide (about 25-30 cols)...does MVC3 WebGrid support horizontal scrollbars (or can I house the grid in a html tag/control)?

-------------Problems Reply------------

Never realised about the WebGrid, so had to play with it to help on this one.

Basically, if you put the webgrid inside a div with an overflow set, then it seems to work fine.

I tested it on mine with the following code (I just shrank the test div to simulate small screen/many rows (was to lazy to create loads of col/properties, lol.

<div class="test" style="overflow: scroll; width: 150px">
<div style="width: 1000px">
@grid.GetHtml()
</div>
</div>

Category:asp.net mvc 3 Views:4 Time:2011-10-21

Related post

  • webgrid witha horizontal scrollbar? 2011-05-20

    I am using webgrid of asp.net mvc 3.0 razor view to display a dataset. The dataset has 36 columns and so the webgrid goes beyond the visible window. How can I display it within the visble window with a horizontal scrollbar. I'll appreciate any help.

  • Disable browsers vertical and horizontal scrollbars 2008-10-28

    Is it possible to disable the browsers vertical and horizontal scrollbars using jQuery or javascript? --------------Solutions------------- In case you need possibility to hide and show scrollbars dynamically you could use $("body").css("overflow", "h

  • Internet explorer creates horizontal scrollbar for vertical scrollbar's width 2008-10-30

    A div, containing a table has the following CSS styling: #formulaAlts{ float: right; height: 200px; overflow: auto; } This makes it so that when the table is >200px, a scrollbar appears only for the table and the other elements on the page stay pu

  • overlong image header, but how to only show horizontal scrollbar on body content? 2010-03-12

    I have a 4000px width image slap on the header of my site. for now, the way I hide the horizontal browser scrollbar is with this: html { overflow-x: hidden; } Unfortunately that will make the horizontal scrollbar never appear. I would the browser scr

  • Positioning the starting position of Horizontal Scrollbar slider on the right 2010-06-30

    I want to Set the Horizontal Scrollbar slider to the right without using css direction:"ltr" or dir="ltr" or an asp:Panel direction="rightToLeft".... i just want to access the object that controls the Horizontal scrollbar slider to give it the positi

  • Remove iframe horizontal scrollbar 2010-08-10

    I want to remove the horizontal scrollbar in my iframe. I just need a vertical scrollbar to view the lengthy contents. My code is <iframe height='514' width='790' marginwidth='0' marginheight='0' frameborder='0' overflow-y='scroll' overflow-x='hid

  • CSS - use a horizontal scrollbar only 2010-09-18

    i need to use an horizontal scollbar only if the content of the div is longer than the width value. so i write : .viewgallerylist{width:920px; float:left; padding-top:20px; height:120px; border-bottom:1px #000000 solid; overflow-x: scroll;} the probl

  • MVC3 WebGrid Formatting or Styling Column Headers 2011-02-01

    I'm using the new MVC3 WebGrid. So far so good, just having issues styling/formatting the column headers. The best I've got is a workaround that applies the same css class from the first row of the WebGrid to the table header. var headerCells = $("#g

  • how to insert newline in multiline textbox for horizontal scrollbar for compact framework 2.0 using c# 2011-02-08

    i'm working on .net compact framework 2.0 using c#. i have to set horizontal scrollbar of multiline textbox. i have done following step: wordwrap = false and multiline = true problem is that when i'm giving to a long text, they are overlap to each ot

  • Microsoft gradient filter causes inactive horizontal scrollbar in IE8 with HTML5 2011-06-30

    I'm using HTML5 Boilerplate and added a gradient background, including the Microsoft filter for IE. In IE8, when the content is larger than the viewport horizontally (vertically works OK) a scrollbar appears, but it is inactive and the content beyond

  • Overflow:auto doesn't display horizontal scrollbar 2011-09-08

    I have a gridview that has some 20 columns and 1000 rows. The grid is placed under <div> tag. Due to such large figures, the div shows the vertical scrollbars, which is fine but it doesn't show the horizontal scrollbar. The css written for div

  • sudden long horizontal scrollbar, tried several solutions incl. "overflow: hidden" but to no avail 2012-01-23

    I suddenly got this long horizontal scrollbar on my Wordpress blog that uses the theme "Wave" by Themeforest, here. The scrollbar did not appear before, so it is not an issue with the original theme (I mean I can't blame the theme). I deactivated lat

  • HTML paragraph + Horizontal scrollbar 2012-03-26

    I have created an HTML paragraph by using the <p> tag. The dimensions of the paragraph block are : X-Dimension : 300px. Y-Dimension : 400px. If I insert a long continuous line of characters I want a horizontal scrollbar to be displayed. I have

  • Horizontal scrollbar in navigation pane when viewing mail folders 2013-07-11

    I know I can bet horizontal scrollbars by viewing the Folder List in the navigation pane, but my web search reveals that this is not possible when viewing only mail folders in the navigation pane. I am hoping against hope that Microsoft, in its infin

  • How do I hid the Horizontal scrollbar 2014-05-31

    How do I hid the Horizontal scrollbar --------------Solutions------------- By stretching the window horizontally so that it's not needed any more? How to ask a question... http://support.microsoft.com/kb/555375 Tricky

  • How can I disable horizontal scrollbars in Flex components? 2008-10-15

    I have a few GridItem components that gets filled with dynamic data. Sometimes this data longer than the GridItem's fixed width, causing the GridItem to get a horizontal scrollbar. How can I disable this (I'm assuming you can...) Is there a general s

  • Windows Forms ListView missing horizontal scrollbar 2009-04-07

    I have a Windows Forms ListView in a form (C#, VS 2005) and have it anchored to all the edges of the form so that it entirely fills the form excluding the status bar. The ListView is in detail mode and the columns are very wide - definitely wider tha

  • How can I add a horizontal scrollbar to a VBA ListBox 2009-05-08

    I'd like to add a horizontal scrollbar to a VBA ListBox. It appears that the built in ListBox does not add a horizontal scrollbar automatically. I have a number of fields whose contents exceed the width of the ListBox and are thus unreadable to the u

  • Why does Firefox put a horizontal scrollbar on my div? 2009-06-17

    I've got a very simple test case: <html> <body> <div style="border:2px solid black; overflow: auto;"> x </div> </body> </html> When I render it, I get a horizontal scrollbar: I had been using FF 3.0.3 for Linux, an

Copyright (C) dskims.com, All Rights Reserved.

processed in 0.139 (s). 11 q(s)