Examples

Basic jqgrid

resource id Resource Name Contact number of versions

The Scripts

                <script src="//bugwoodcloud.org/CDN/datatables/js/jquery.dataTables.min.js"></script>
				<script src="//bugwoodcloud.org/CDN/datatables/js/datatablesBootstrap.js"></script>
				<script src="//cdn.datatables.net/scroller/1.2.1/js/dataTables.scroller.min.js"></script>
				<link rel="stylesheet" type="text/css" media="screen" href="//bugwoodcloud.org/CDN/datatables/css/datatablesBootstrap.css" />

The HTML

                <table id="datatableExample"  class=" pointer table table-striped table-bordered" cellspacing="0" width="100%">
	            <thead>
	                <tr>
	                	<th>resource id</th>
	                	<th>Resource Name</th>
	                	<th>Contact</th>
	                	<th>number of versions</th>
	                </tr>
	            </thead>
	            <tfoot>
	                <tr>
	                    <th colspan="4">
	                    </th>
	                </tr>
	            </tfoot>
	        </table>

The Javascript/jQuery to make it work

 	
                var dtable= (function($) {
	            'use strict';
	             var table =$('#datatableExample').DataTable( {
	                     'serverSide': true,
	                    'bAutoWidth': false,
	                    'processing': true,
	                     'bSortClasses': false,
	                     'pageLength':10,
	                     'columnDefs': [
	                        {
	                        'searchable': false,
	                        'sortable': false,
	                        'targets': 0
	                    	,'visible':false}
	                      ] ,
	                    'scrollY':'500',
	                    'scrollCollapse': true,
	                     'dom': 'ifrtS',
	                    'deferRender': true,
	                    'order': [[ 1, 'asc' ]],
	                   'ajax': {
	                        'url':'https://api.bugwood.org/rest/api/resource/.json?system=5',
	                    }
	                    });
			    var reload=function(querystring){
		        	
		        	var url='https://api.bugwood.org/rest/api/resource/.json';
		        	console.log(url);
	                table.ajax.url(url).load();
	            }
	            return {
	                table: table,
	                reload:reload,
	            };
	        })(jQuery);
	        var params={};
		    jQuery(function($) {
		        'use strict';
		        dtable.table;
		    });