When the first time data comes from . I am sending the

When the first time data comes from . I am sending the toal no of records in the user data section of the rows. I want to fix the total number of pages. How i can fix this.

Grid has native support for such functionality, you can just set it as
   
    <row …

The “limit” attribute works in paging mode, and count of pages will be set according to it.

If you want to set some value in runtime it can be done as
    grid.limit=VALUE:
    grid.changePage(0); //force render
but this is inner functionality, and it can be changed in next version of grid.