Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_Related Related Topics sp_TopicIcon
How do I change the size of a grid? Also how to add/remove scroll bars?
13/10/2010
19:33
Avatar
alohaaaron
Member
Members
Forum Posts: 11
Member Since:
13/10/2010
sp_UserOfflineSmall Offline

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>

13/10/2010
22:15
Avatar
bogoa666
Malaga (Spain)
Member
Members
Forum Posts: 21
Member Since:
23/09/2010
sp_UserOfflineSmall Offline

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."

Forum Timezone: Europe/Sofia

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.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information