How to know how many pages are their in pagintion


can any one please tell me how to know how many total pages are their in grid requirements is to show like this

page 1 of totalpages

You can get total number of rows as
var total = grid.getRowsNum();
and size of the page
var size = grid.rowsBufferOutSize

In such case, total count of pages will be