Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sorting data in grid
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00322441
Message ID:
00322782
Views:
21
Using a view you have to generate the index you need on your own, instead of relying on it in the .cdx. If it's confusing it's pretty easy.

When you load your data in teh form, I would :

use lv_my_view NODATA && nodata brings the shell with no records
Index on my_criterior tag my_tag && create the tag
requery() && now bring in the data into an indexed environment

Now in your click event for the header:
set order to my_tag
this.??????.refresh() I an not sure about your grid so just do a right mouse click to see the object list. Click on the grid itself and add the refresh() to the end.

__Stephen



>thanks for answering back. My grid is based on a updateable view (lv_dposcr) and the table it is referencing is person_tbl. When I issue set order to lv_dposcr.lname, I get the following error:
>
>Table has no index order set (error 26)
>
>Do I have to issue a set index to command? Is there something I am suppose to checkoff in my view? Also will this sort cause problems when I try to update my view? Thanks for your help
>
>
>Nick Patel
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform