Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to set width of a jQGrid in percentage?

Is it possible to set width of a jQGrid in percentage? If yes, then how?

like image 898
Amit Avatar asked May 12 '12 05:05

Amit


People also ask

How do you set the width of a jqGrid percentage?

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.

How is jqGrid width dynamically set?

You can set the new width of the column using two methods – setColProp and setGridWidth. This solution works, except that I needed to use "widthOrg" instead of "width" in the call to 'setColProp'.

What is jqGrid example?

Free jqGrid is a JavaScript plugin that displays table-based data in a lot of different configurations. The data can be loaded from JavaScript array or be loaded from the server (in JSON or XML format). It supports client-side paging, sorting and filtering on server-side.

How do you hide jqGrid?

Just set opacity:0 for jqgrid element. it will work also.


1 Answers

Not directly but it is possible...

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.

autowidth: true

If you want to set the column widths by percentage you can use shrinktofit and then your column width values are basically a percentage.

shrinkToFit: true

These options and many others can be found on the JQGrid wiki

like image 137
DisplayName Avatar answered Oct 07 '22 23:10

DisplayName