Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sorting grid on Click header
Message
De
05/04/2020 01:23:46
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
04/04/2020 06:29:26
Luis Santos
Biglevel-Soluções Informáticas, Lda
Portugal
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01673953
Message ID:
01673954
Vues:
75
>Hello community,
>
>I see a Post by Yousfy for creating BINDEVENT on grid INIT to sortign grid on header click.
>I try to change the same for my grid form, but i always received this error "Table has no index order set.", i don´t understand why.
>This is my code :
>
>
>Public oHandler
>oHandler = Newobject( "myhandler" )
>Bindevent(PDU_FCTEXM.Pageframe1.Udcpage3.Grid1,"Init",oHandler,"mygridinit",1)
>
>For i=1 To PDU_FCTEXM.Pageframe1.Udcpage3.Grid1.ColumnCount
>	If Inlist(i,1,2,3,4,5,6,7,8,9,10,11)  &&choice only the column to sort asc/descending-grid can have any columnCount
>		aa="PDU_FCTEXM.Pageframe1.Udcpage3.Grid1.column"+Trans(i)+".header1"
>		Bindevent(&aa,"click",oHandler,"mygridinit",1)
>	Endif
>Endfor
>
>
>Define Class myhandler As Session
>	Procedure mygridinit
>	x=Sys(1270)
>	N=val(right(allt(x.name),1))
>
>	Select myBolistex
>	If Val(Sys(21))<>N  && current index number
>		Set Order To N In myBolistex
>	Else
>		If Descending(N,"myBolistex")
>			Set Order To N In myBolistex Ascending
>
>		Else
>			Set Order To N In myBolistex Descending
>
>		Endif
>	ENDIF
>	
>	Go Top In myBolistex
>	PDU_FCTEXM.Pageframe1.Udcpage3.Grid1.Refresh
>	PDU_FCTEXM.Pageframe1.Udcpage3.Grid1.SetFocus
>	Endproc
>
>Enddefine
>
>
>someone could give me the reason for that error.

Is it possible that N is sometimes greater than the number of index tags on your cursor? I tried to
set order to 5
on a table with 3 tags and got the same error.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform