Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Grid numbers


does any1 know how to get row numbers on a grid?

Setting the "RowsHeader" just gives an error...

Thx in advance.

/Peter Halden

Former Member replied

As the grid with an underliing datatable will show you all columns you fetch, you can try to populate the first column of the datatable with row numbers.

To do so you only have to create a SQL query/Stored Procedure which returns the count of the actual row. One approach can be a selfjoin like this little example:

SELECT count(*) LineNumber,


FROM OHEM a join


on a.LastName >= b.LastName

group by a.LastName

order by a.LastName

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question