Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Setfocus() in grid column
Message
De
29/06/2001 02:26:37
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00525000
Message ID:
00525049
Vues:
19
>That can happen if you moved the columns in your grid around. Check what is the name of the column which really gets focus. See the sample form I just sent you where everything works as you want it, and check what is different from yours.
>
>Also, you might want to use WITH ... ENDWITH to simplify and speed up your code:
>
>WITH thisform.grid1
>.Column3.readonly=.f.
>.Column4.readonly=.f.
>.Column5.readonly=.f.
>.Column6.readonly=.f.
>.Column7.readonly=.f.
>.Column8.readonly=.f.
>sele MyTempGridFile
>appe blank
>.refresh()
>.column3.setfocus()
>ENDWITH
>
>
>Or use SetAll method:
>
>WITH thisform.grid1
>.SetAll("ReadOnly", .f., "Column") && Column 1 and 2 have .Enabled = .f. so their .ReadOnly setting does not really matter
>sele MyTempGridFile
>appe blank
>.refresh()
>.column3.setfocus()
>ENDWITH

Yes, you were right there is something wrong with my code, I've check that the problem because I freeze the column.

here is the code in the thisform.grid1.scrolled :

this.column3.columnorder = 3
this.column4.columnorder = 4
this.column5.columnorder = 5
this.column6.columnorder = 6
this.column7.columnorder = 7
this.column8.columnorder = 8
this.column1.columnorder = this.leftcolumn
this.column2.columnorder = this.leftcolumn+1

If I don't freeze it there is nothing wrong, or maybe I should add some code, do you have any idea ?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform