Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Focus in Grid
Message
De
03/05/2001 03:57:19
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
03/05/2001 03:14:59
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00502883
Message ID:
00502890
Vues:
18
>Hi!
>
>I am trying to make grid code that will:
>
>When a use ris in readonly non-edit mode they can select a row/column in a grid.
>Then after they press the edit button (thus focus is gone from the grid)
>The cursor goes directly back to the same field in the grid.
>
>However, Also when going into edit mode the cursors order changes (by design).
>
>How could I handle this?
>
>I tried:
>
>AfterRowChange
>
>IF lEditMode
> thisform.nrowno=this.activerow
> thisform.ncolno=nColIndex
>ENDIF
>
>Edit Button Click
>thisform.measlist.activatecell(thisform.nrowno,thisform.ncolno)
>
>This worked sometimes but the grid jumps all over the place and is unreliable.
>Any ideas?
>
>Thanks

Tim,
This is simple but works (assuming you already have tags with same name as fieldname) :
with ThisForm.Grid1
  .Readonly = .f.
  .Setfocus()
  Set order to tag (varread())
  lnRecno = recno()
  .refresh
  go lnRecno
endwith
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform