Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Row number in grid
Message
From
01/04/2010 07:50:44
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01458306
Message ID:
01458329
Views:
42
>>Hi,
>>but the record no. is not equal to the row no. I want to display row 1,2,3,4,5,6....
>>the record no. may be, 2, 4, 10,1,8....
>>
>>Derek
>
>Right, I understand and I didn't suggest to use recno(). I suggested to add number in the underlying cursor. One of the ways would be to do it after the fact, e.g.
>
>select fields, cast(0 as int) as RowNumber from myTable into cursor curGrid readwrite
>
>replace RowNumber with recno() in curGrid all && this will add 1,2,3, etc. numbers to the cursor

Why would you want to do that when there is recno()? Why don't you suggest, is there a reason? Even if one wouldn't use recno() because of something like indexed view along with 1,2...100 numbering then why would you ever want to add to source another column, you could use an auxillary cursor or array.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform