Rowindex for gridview control - VS 2008
With a gridview linked to a sql datasource, I want to display a column named ID. The identifier should display the line number for each line. How do I bind this to rowindex instead of the ID column from the database?
+1
sj
source
to share
1 answer
To do this, I would use the ROW_NUMBER () function, which is new in SQL Server 2005. This function returns the rownumber in the returned recordset. ScottGoo has a great post . NTN, Valve.
+1
Valentin
source
to share