Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Ascending or descending
Message
From
22/04/2006 05:28:01
 
 
To
22/04/2006 01:35:38
Suhas Hegde
Dental Surgeon
Sirsi, India
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 6 SP5
Miscellaneous
Thread ID:
01115316
Message ID:
01115681
Views:
8
>hi,
>It is for display in the grid to reverse the order . ANy better way u know off ?
>
>It would really help
>
>thanx
>
>suhashegde

Maybe not 100% bullet proof, but this function works for my needs
Function ShiftOrder && "Do shiftorder" or "Do Shiftorder with MytableAlias" to change direction
Lparameters lxAlias
Local lcCurrent
lcCurrent=Select()
If Pcount()>0
  lcAlias=Alias(lxAlias)
Else 
  lcAlias=Alias()
Endif 
If Empty(lcAlias)
  Return .F.
Else
  Select (lcAlias)
  If 'DESCENDING'$Set('order')
    Set Order To (Tag())
  Else 
    Set Order To (Tag()) Descending 
  Endif 
Endif 
Select (lcCurrent)
Return
Previous
Reply
Map
View

Click here to load this message in the networking platform