Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Multiple sort orders on views
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00053592
Message ID:
00053598
Vues:
30
>>>>How can I have multiple sort orders on my view? I have a grid on a form, which is view, where I need to offer the client a choice of selecting multiple sort orders.
>>>>
>>>>As for as I know, we can only have one sort order per view. Does this mean, I need to create one view per sort order and switch view when the user switch the sort order?
>>>
>>>If your view is reasonably small, you can create different index tags which will allow multiple data presentation in grid.
>>
>>My view is 400 records. But, how can I create multiple index tags for a view. In the CREATE VIEW definition, there is only one ORDER clause possible.
>
>When view is created, handle it as a table:
>Select View1
>Index on ... tag ...
>and so on. When it's going to changing sort:
>Select View1
>Set Order to tag ...
>Thisform.Grid1.refresh

You can index a view from BeforeOpenTables:

nodefault
dodefault()

select vview && vview is the DataEnvironment

index on {fieldname1} tag {tagname1}
index on {fieldname2} tag {tagname2} ...

cursorsetprop("Buffering", 5, "vview")

Or from anywhere else when you're using optimistic row buffering, and no pending updates:

cursorsetprop("Buffering", 3, "vview")

index on {fieldname1} tag {tagname1}
index on {fieldname2} tag {tagname2} ...

cursorsetprop("Buffering", 5, "vview")

HTH,
Darren Young
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform