Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problems with GRID
Message
From
20/08/1999 07:38:29
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
20/08/1999 06:25:59
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00255741
Message ID:
00255767
Views:
23
>Thanks for help but, the count number shouldn't be tight with recno() becouse in a grid I list tables with diferent indexes and sorting, so the count will not be alwaus 1,2,3,4..... top-down.
>
>Any idea ???
Views would be an easy way. If you could do that then use views.
Or :
select PKValue from yourtable ;
  where your_filter ;
  order by YourOrder ;
  into cursor tmpCursor ;
  nofilter
use dbf("tmpCursor") in 0 again alias NumberProvider
use in "tmpCursor"
select NumberProvider
index on PKValue tag Linker
select (yourgrid.recordsource)
set relation to PKValue into NumberProvider
yourgrid.columns(n).controlsource = recno("NumberProvider")
You could do this with an array in case your table reccount() would always be <= 65000 (use only PK then and issue ascan()).
If editable grid then you should reSQL with a union to include buffered ones (it's a little tricky).
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