Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to show item count on pager ? #23

Closed
jewway opened this issue Apr 28, 2015 · 3 comments
Closed

How to show item count on pager ? #23

jewway opened this issue Apr 28, 2015 · 3 comments

Comments

@jewway
Copy link

jewway commented Apr 28, 2015

I don't know how to display itemCount on pager , if can support like {itemCount} parameter for manipulating pagerFormat ?

Thanks very much !

@tabalinas
Copy link
Owner

Thank you for the request!
It looks valuable and worth to be implemented.

For now you can use following workaround:

$("#jsGrid").jsGrid({
    ...

    pagerFormat: "total items: {itemsCount}",

    onRefreshed: function() {
        $(".jsgrid-pager").contents().filter(function() {
            return this.nodeType == 3;
        }).each(function(){
            this.textContent = this.textContent.replace('{itemsCount}', $("#jsGrid").jsGrid("_itemsCount"));
        });
    }
});

Hope it will help.

@jewway
Copy link
Author

jewway commented Apr 29, 2015

Thank you so quick to reply , It is helpful for me ,
I like your coding style !! nice project !!

@tabalinas
Copy link
Owner

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants