sahana
sahana

Reputation: 621

Not able to find out the jquery width attribute

I am trying to increase the width of a jqgrid table. Firebug shows the following line where I can change the width.

<div class="ui-jqgrid ui-widget-content ui-corner-all" id="gbox_list" dir="ltr" style="width: 685px;">

Where is this inside the css file ? I am not able to find a line like this neither in jquery-ui.css nor in the ui.jqgrid.css files.

I am trying the code from http://jsfiddle.net/hekai/QEzhr/1/

Thanks.

Upvotes: 0

Views: 41

Answers (1)

苏月如
苏月如

Reputation: 61

Read the documentation:

http://www.trirand.com/jqgridwiki/doku.php?id=wiki:options

width: If this option is not set, the width of the grid is the sum of the widths of the columns defined in the colModel (in pixels). If this option is set, the initial width of each column is set according to the value of the shrinkToFit option.

so 685px is the sum of the columns' with you defined in colModel, (of course including some extra border width)

It was set at run time by javascript (jqgrid), you can change it via set the width option, or change your column widths, or set the autowidth option to true.

Upvotes: 1

Related Questions