question on listgrid paging

Hi,
I have an application where I draw a listgrid with the column names, column types and the data coming from the server in JSON format.

The format of the JSON returned from the server is as follows:
[[field1, field2, field3], [str, float, int], [{field1: val11, field2:val12, field3: val13}, {field1: val21, field2: val22, field: val23}, …]]

I create the datasource as follows:

colNames: first entry of the json
colTypes: second entry of the json
dataJSON: third entry of the json

/* Create a new data source */
DataSource ds = new DataSource();

ds.setDataFormat(DSDataFormat.JSON);
ds.setClientOnly(true); 
		
/* Get the column names, column types and data is JSON arrays and objects */
String [] fieldNames = Utils.jsonArrayToStringArray(colNames);
String [] fieldTypes = Utils.jsonArrayToStringArray(colTypes);
		
/* Create the datasource fields */
for (int fi=0; fi<fieldNames.length; fi++) {
   String ft = fieldTypes[fi];
   DataSourceField f = new DataSourceField();
   f.setName(fieldNames[fi]);
   if (ft.equals("float") || ft.equals("double")) {
     f.setType(FieldType.FLOAT);
   } else if (ft.equals("str") || ft.equals("text")) {
     f.setType(FieldType.TEXT);
   } else if (ft.equals("int") || ft.equals("long")) {
     f.setType(FieldType.INTEGER);
   } else if (ft.equals("date")) {
     f.setType(FieldType.DATE);
   }
   ds.addField(f);
}

// Now, populate data				
for (int di=0; di<dataJSON.size(); di++) {
  JSONObject jObj = dataJSON.get(di).isObject();
  ListGridRecord row = new ListGridRecord(jObj.getJavaScriptObject());
  ds.addData(row);
}

setDataSource(ds);

ArrayList<ListGridField> gridFields = new ArrayList<ListGridField>();
/* Create the listgrid fields */
for (int fi=0; fi<fieldNames.length; fi++) {
  ListGridField gridField = new ListGridField(fieldNames[fi], fieldNames[fi]);
  gridFields.add(gridField);
}
setFields(gridFields.toArray(new ListGridField[gridFields.size()]));

The above seems to work great… However, I would like to get paging to work. I have looked at the showcase and did not find any examples that were relevant.

I did look at the RestDataSource documentation. If i were to use that, would I simply need to change the dataJSON part of my JSON response to the format that RestDataSource expects? and would that automatically enable paging in the grid? would the response have all the data records and the paging would be done on the client side?

I am relatively new to SmartGWT, so any pointers would be appreciated.

Thanks,