Is it possible to make it so that a jqGrid will have a width set to 100%? I understand that column widths must be an absolute pixel size, but I've yet to find anything for setting the width of the actual grid to a relative size. For instance, I want to set the width to 100%. Instead of 100% it seems to use an odd size of 450px. There is more horizontal room on the page, but with the columns width and such, it will make the container(of only the grid) horizontally scroll. Is there some way around this?
If you are wanting to set the width of the entire grid to a percentage you can use the autowidth property and it will set the grids width to the width of it's parent element (i.e. DIV) and that parent element can have it's percentage set.
Just set opacity:0 for jqgrid element. it will work also.
In this step, we are going to add jqGrid Script and CSS reference to index view. This script is added to project when we add jqGrid Grid from NuGet package. After adding Scripts and Css next we need to add table element for reserve the place where the grid should be created.
autowidth: true
from 3.5 onwards
It works for me:
width: null, shrinkToFit: false,
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With