Hi,
Using Dojox Grid, I want to pass some data (for pagination) from server when getting JSON data with QueryReadStore . For that, I add new attribute named nPages in JSON object, so my JSON seems like this : {"nPages":"3","items":[{"wake":"2010","number":"008"},{"wake":"2009","number":"003"}]}
How can I read the attribute nPages from onComplete fetching Data when I click on button.
My Code:
<div dojoType="dojox.data.QueryReadStore" jsId="store" url="/editItem.jhtml?action=data" requestMethod="get"></div>
<div id="gridData" sortInfo="2" dojoType="dojox.grid.DataGrid" jsid="grid2" rowsPerPage="2" store="store" structure="gridLayout"></div>
<input type="button" onclick="store.fetch({query: {page: ++gridPage } , onComplete:function(items, request) {}});" value=">>">
Thanks in advance.