You can add an autonumber field to your entity. Note though that deleting objects will not free that number. If you need the numbers to always have no gap you need to create that number yourself.
Regards,
Ronald
Probably going to get flogged for this again, try this, uses no database stuff
var YOURGRIDCLASSSELECTOR='.mx-grid';
var wid=dijit.byNode(dojo.query(YOURGRIDCLASSSELECTOR)[0])
if(wid!=null){
if(wid.addRowIdx==null){
wid.addRowIdx=function(colIdx){
this._gridRowNodes.forEach(
function(r,ridx){
dojo.query('td',r)[colIdx].innerHTML=wid._dataSource._offset+ridx;
}
)
}
wid.refreshGridOrig=wid.refreshGrid;
wid.refreshGrid=function(){
this.addRowIdx(0);
this.refreshGridOrig();
}
wid.addRowIdx(0);
}else{
mx.ui.warning(YOURGRIDCLASSSELECTOR+" found but already patched");
}
}else{
mx.ui.error(YOURGRIDCLASSSELECTOR+" not found");
}
Ads another function on the grid instance and addRowIdx can be manipulated to replace the content of a specified collumn, so you just have to create a dummy column, uses pagination to compute the row idx, remains monotonic increasing with no gaps