dedoz
14 Apr 2012, 8:04 AM
Im using Ext.toolbar.Paging a Ext.panel.grid and a Ext.data.Store and model.
Data is loading and displayed correctly in the grid, according to the page and limit params.
My problem is the total count.
i didnt configure proxy totalProperty config, im using its default name "total".
-----
totalProperty : String
Name of the property from which to retrieve the total number of records in the dataset. This is only needed if the whole dataset is not passed in one go, but is being paged from the remote server.
Defaults to: "total"
------
so i return a "total" value in the response JSON, on the metada part
JSON response
{ "type":"rpc",
"tid":6,
"action":"empQuery",
"method":"Select",
"result":[{"id":1,"name":"peter"},{"id":2,"name":"mary"},.................],
"total":274,
"success":true,
"message":"OK"
}
but grid paging bar shows
Page [ 1 ] of 1 Displaying 1 - 25 of 25
and the buttons prev/next are disabled.
It displays the 25 loaded records correctly, is just the total and i guess the buttons depend on that total number.
if it was working properly should say "Displaying 1 - 25 of 274" and buttons next/prev should be enabled.
Do i need to configure the total property even when im using "total" default name ? or im mising something else
im using 4.1rc2
Data is loading and displayed correctly in the grid, according to the page and limit params.
My problem is the total count.
i didnt configure proxy totalProperty config, im using its default name "total".
-----
totalProperty : String
Name of the property from which to retrieve the total number of records in the dataset. This is only needed if the whole dataset is not passed in one go, but is being paged from the remote server.
Defaults to: "total"
------
so i return a "total" value in the response JSON, on the metada part
JSON response
{ "type":"rpc",
"tid":6,
"action":"empQuery",
"method":"Select",
"result":[{"id":1,"name":"peter"},{"id":2,"name":"mary"},.................],
"total":274,
"success":true,
"message":"OK"
}
but grid paging bar shows
Page [ 1 ] of 1 Displaying 1 - 25 of 25
and the buttons prev/next are disabled.
It displays the 25 loaded records correctly, is just the total and i guess the buttons depend on that total number.
if it was working properly should say "Displaying 1 - 25 of 274" and buttons next/prev should be enabled.
Do i need to configure the total property even when im using "total" default name ? or im mising something else
im using 4.1rc2