Forum
19:33
13/10/2010
Hi, How do I change the size of a grid? My default grid is very small and I don't see documentation to change the size of it. Also how do I add/remove scroll bars? Is there a good document source for these questions? Thanks!
Here is my code.
$(function(){
$("#list").jqGrid({
url:'server3.php',
datatype: 'json',
mtype: 'GET',
colNames:['Inv No','Date','Clientid', 'Amount','Tax','Total','Notes'],
colModel :[
{name:'invid', index:'invid', width:55},
{name:'invdate', index:'invdate', width:90},
{name:'clientid', index:'clientid', width:90},
{name:'amount', index:'amount', width:80, align:'right',sorttype:'number',formatter:'number',summaryType:'sum'},
{name:'tax', index:'tax', width:80, align:'right',sorttype:'number',formatter:'number',summaryType:'sum'},
{name:'total', index:'total', width:80, align:'right',sorttype:'number',formatter:'number',summaryType:'sum'},
{name:'note', index:'note', width:150, sortable:false,sorttype:'number',formatter:'number',summaryType:'sum'},
],
pager: '#pager',
rowNum:200,
rowList:[10,20,30,40,50,100,500],
sortname: 'invid',
sortorder: 'asc',
viewrecords: true,
caption: 'My Grid'
});
});
<table id="list"></table>
<div id="pager"></div>
22:15
23/09/2010
You can view de grid options here: http://www.trirand.com/jqgridw.....ki:options
"height: Can be set as number (in this case we mean pixels) or as percentage (only 100% is acceped) or value of auto is acceptable."
"width: If this option is not set, the width of the grid is a 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 shrinkToFit option."
Most Users Ever Online: 715
Currently Online:
33 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66