EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: glarsen on July 31, 2014, 01:32:25 PM



Title: Pagination layout in datagrid
Post by: glarsen on July 31, 2014, 01:32:25 PM
Hi,

Trying to minimize the paging options in a data grid but can't seem to get the layout option to work,  I've tried in both the datagrid the  pagination references without any success (all the pagination controls are displayed).

        var dg = $('#g' + g.id);

        dg.datagrid({
          title: 'Members',
          autoRowHeight: false,
          fitColumns: false,
          rownumbers: true,
          nowrap: true,
          pagination: true,
          pageSize: 10,
          showPageList:false,
          showRefresh:false,
          layout:['first','prev','next','last']

        dg.pagination({
          showPageList:false,
          showRefresh:false,
          layout:['first','prev','next','last']
        });

Probably missing something basic. Thanks for any help,
gary


Title: Re: Pagination layout in datagrid
Post by: glarsen on August 01, 2014, 07:23:55 AM
Found the answer in Custom Datagrid Pager demo:

http://jeasyui.com/demo/main/?plugin=DataGrid&theme=default&dir=ltr&pitem=

$(function(){
  var pager = $('#dg').datagrid().datagrid('getPager'); // get the pager of datagrid
  pager.pagination({