Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Read only property of the grid
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00389647
Message ID:
00389727
Vues:
13
>Thanks for the reply
>
>and
>
>I mean to say that, Need to edit only a row at a time. The cursor should not go to the next row.

Then you need code in the BeforeRowColChange to verify that the user can change Rows. If they can, issue a DODEFAULT(), otherwise issue a NODEFAULT. To make this work, you will need a grid property called something like OldActiveRow. The following code is what I have in my grid baseclass to track ROW changes only:
INIT:

if !empty(This.RecordSource) and reccount(This.RecordSource) > 0
   This.OldActiveRow = RecNo()
else
   This.OldActiveRow = 0
endif

BEFOREROWCOLCHANGE:

LPARAMETERS nColIndex
if !empty(This.RecordSource) and reccount(This.RecordSource) > 0
   This.OldActiveRow = RecNo(This.RecordSource)
else
   This.OldActiveRow = 0
endif

AFTERROWCOLCHANGE:

LPARAMETERS nColIndex
if !empty(This.RecordSource) and reccount(This.RecordSource) > 0
   if This.OldActiveRow <> RecNo(This.RecordSource)
      This.GridRowChange()  && custom method where I put any additional code
      ThisForm.Refresh()
   endif
endif
Mark McCasland
Midlothian, TX USA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform