Base solution for your next web application
Open Closed

jtable page numbering #2406


User avatar
0
huntethan89 created

Hi,
I am retrieving data from database and displaying using jtable. i am returing PagedResultDto which contaions 14188 records. So, I implemented paging on jtable. So it made 1419 pages . but it is not showing page number 1 and last page number 1419 in dropdown. It is displaying page number from 2 to 1418 in dropdown. Why it is not showing 1 and last page number.

This is jtable code -

_$EncumbranceListTable.jtable({
// title: app.localize('Builders List'),
paging: true,
sorting: true,
multiSorting: true,
actions: {
listAction: {
method: _EncumbranceListService.getEncumbranceList
}
},

        fields: {
            id: {
                key: true,
                list: false
            },

            actions: {
                title: app.localize('Actions'),
                width: '15%',
                sorting: false,
                display: function (data) {
                    var $span = $('<span></span>');

                    if (_permissions.edit) {
                        $('<button class="btn btn-icon btn-xs" title="' + app.localize('Edit') + '"><i class="fa fa-edit"></i></button>')
                            .appendTo($span)
                            .click(function () {
                                showhidedivs(0);
                                _EncumbranceListCompanies.html('<i class="fa fa-save"></i> Update');
                                updateEncumbranceListid = data.record.id;
                                getEncumbranceListinfo(data.record.id);
                            });
                    }

                    if (_permissions.delete) {
                        $('<button class="btn btn-icon btn-xs" title="' + app.localize('Delete') + '"><i class="fa fa-trash-o"></i></button>')
                            .appendTo($span)
                            .click(function () {
                                deleteUser(data.record);
                            });
                    }

                    return $span;
                }
            },

            encumbranceNumber: {
                title: app.localize('EncumbranceNumber')
            },
            descriptionShort: {
                title: app.localize('DescriptionShort')
            }
        }
    });

Thanks


1 Answer(s)