How to pass Total Record for paging

Hi,
I want to use server side paging and i am using datatype as json and i am passing json data as List from server, in different way, [{Name="",…},{Name="",…},{Name="",…},…] and i am using enablePaging for display paging. As enablePaging accepts the argument as PageSize, PageInGroup,… so we need to pass all the records at once, let say if 5000 records is there we need to pass all 5000 records from server and it displays only whatever pagesize we have passed in enablePaging function and on click of different page it displays the desired record, means paging do in client size. What my requirement is, i want to send only the record which need to display in one page and display the paging (let say total record is 1000, and pageSize is 50 so i want to send only 50 records from server and display the paging in bottom and on click on different page get that page record from server and display it(reload it)), so can you tell me how to do it?

(DHTMLX is very very difficult to use, they should have made very simple)

Thanks
Raviranjan

This is exactly the way is dynamic loading+paging works in dhtmlxgrid.

In the following sample the grid loads the data to the grid by portions in 10 pages and renders only the current page:
dhtmlx.com/docs/products/dhtmlxG … nload.html

Hi,
Where you are passing total record, i mean 2000? Also i want for JSON format, not XML.

Thanks
Raviranjan

data={"total_count":2000, "pos":0, rows:[ { id:1, data: ["A Time to Kill", "John Grisham", "100"]}, { id:2, data: ["Blood and Smoke", "Stephen King", "1000"]}, { id:3, data: ["The Rainmaker", "John Grisham", "-200"]} ] };

total_count - both dynamic paging and dynamic rendering modes require specifying the maximum expected count of rows (paging can work without such a limit, but it will not show all available pages from the start in such a case).
As the hardcoding count or rows in javascript code is rare possible, it can be specified directly in XML.
If the value is skipped in SRND mode, the total count is set to the size of incoming XML (basically, the dynamic smart rendering switches to the static smart rendering).
If the value is skipped in paging mode, the grid will request additional data from server until an empty XML set is returned.
The attribute makes no sense in non-dynamic modes.

pos - in case of dynamic smart rendering data is fetched from server by chunks, the “pos” attribute shows in which place of grid the data from incoming XML must be inserted.
In most cases (the exceptions are pretty specific) this value will be equal to the url parameter “posStart” (which is automatically added to all calls in SRND mode).
The attribute makes sense only in SRND mode and will be ignored in any other one;

Hi,

Thanks for your reply, but i am passing simple JSON Array not like above formatted because if we want to pass data in such way we have to format in server/client side and i have to do lots of coding for doing formatting. Also i tried with total_count and pos with simple JSON Array but it was not working. Can you help me?

Thanks
Raviranjan

passing these parameters in the js array is not available.

So, is there any other option to set total page, like function ?

Unfortunately such feature is not available.