Skip to content

Instantly share code, notes, and snippets.

@AhmedSamy
Created January 25, 2014 19:48
Show Gist options
  • Save AhmedSamy/8622402 to your computer and use it in GitHub Desktop.
Save AhmedSamy/8622402 to your computer and use it in GitHub Desktop.
$(document).ready(function () {
$("#list2").jqGrid(
{
url: '{{ path('edfa3ly_backend_banner_jq') }}',
datatype: "json",
colNames: ['ID', 'Status', 'Title'],
colModel: [
{name: 'id', index: '_id', width: 300},
{name: 'status', index: 'status', width: 300},
{name: 'title', index: 'title', width: 300}
],
rowNum: 10,
rowList: [10, 20, 30],
pager: '#pager2',
sortname: 'id',
viewrecords: true,
sortorder: "desc",
caption: "Banners"
}
);
jQuery("#list2").jqGrid('navGrid', '#pager2', {edit: false, add: false, del: false});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment