Calling Convention:
jQuery("#grid_id").jqGrid(properties );
Where:
An example, taken from the tutorial:
jQuery("#list").jqGrid({ url:'example.php', datatype: 'xml', mtype: 'GET', colNames:['Inv No','Date', 'Amount','Tax','Total','Notes'], colModel :[ {name:'invid', index:'invid', width:55}, {name:'invdate', index:'invdate', width:90}, {name:'amount', index:'amount', width:80, align:'right'}, {name:'tax', index:'tax', width:80, align:'right'}, {name:'total', index:'total', width:80, align:'right'}, {name:'note', index:'note', width:150, sortable:false} ], pager: jQuery('#pager'), rowNum:10, rowList:[10,20,30], sortname: 'id', sortorder: "desc", viewrecords: true, imgpath: 'themes/basic/images', caption: 'My first grid' });
When the grid is created, normally several properties are set in the same statement (although these properties can be individually overridden later): see Properties
Events raised by the grid, which offer opportunities to perform additional actions, are described in Events.
The grid also offers several methods for getting or setting properties or data: see Methods
A key property of the grid is the column model (colModel) that defines the contents of the grid: colModel Properties
Additional properties, events and methods of the basic grid, not described in this section, are used to create and manage the three special types of grids: multiselect grids, subGrids and treeGrids. Please refer to those topics for more details.