How to display rownumbers in a grid

Tweeg
05-22-2002, 05:47 AM
Hi there Guys,

Does any1 know how to place rownumbers in a grid?
I use the dbgrid to display results os a search in a table, and want to number the rows displayed.

Thanks

Tweeg

lebb
05-22-2002, 10:30 AM
I believe if you're using a bound DBGrid, you'll need to alter your SELECT statement to pull the rownumbers from the database. For Oracle, I believe it'd be something like "SELECT RowNum, ... FROM YourTable WHERE..." I'm not sure whether the syntax is different for other databases, but the documentation for whichever you're using should tell you.

Tweeg
05-23-2002, 02:10 AM
Thanks for the tip laura.

I am using Access database and will investigate into it.

Tweeg

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum