Here is how this can be done:
- Modify SQL query adding a calculated field named 'Rank'
select [ID],
0 as Rank,
[Make],
...
From [Cars]
2. Proceed to 'Fields order and totals' screen, make sure this 'Rank' field appears in the very first column of your grid and set "View as" type to Custom.
Put the following code there:
XSession.Session["Rank"] += 1;
value = XSession.Session["Rank"];
3. Add the following code to List page: BeforeProcess event:
XSession.Session["Rank"]=0;