SmartGWT 2.5 IE8
I am using RestDataSource,
here are the code:
the result of response.getTotalRows() is same as endRow, the first time both endRow and totalRows are 75, but actually totalRows is much more than 75, when i drag the scrollbar, the totalRows changes, but it is also same as endrow.
How can I get the real totalRow?
Thanks so much!
I am using RestDataSource,
here are the code:
Code:
restDataSource = new RestDataSource() { @Override protected Object transformRequest(DSRequest dsRequest) { String field = listGrid.getSortField(); SortDirection sd = listGrid.getSortDirection(); String direct = sd.getValue(); String url2 = url + "?action=" + Constans.ACTION_LIST_MEMBER_BY_STORE + "&start=" + dsRequest.getStartRow() + "&end=" + dsRequest.getEndRow() + "&storeID=" + storeID + "&field=" + field + "&direct=" + direct; url2 = url2.replaceAll("\"", ""); dsRequest.setActionURL(url2); return super.transformRequest(dsRequest); } protected void transformResponse(com.smartgwt.client.data.DSResponse response, DSRequest request, Object data) { System.out.println(response.getTotalRows()); super.transformResponse(response, request, data); }; }; restDataSource.setDataFormat(DSDataFormat.JSON);
the result of response.getTotalRows() is same as endRow, the first time both endRow and totalRows are 75, but actually totalRows is much more than 75, when i drag the scrollbar, the totalRows changes, but it is also same as endrow.
How can I get the real totalRow?
Thanks so much!
Comment