Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting a cell value from a grid
Message
De
09/04/2004 09:48:32
 
 
À
09/04/2004 09:17:27
Paul Trimming
Lonely Pilgrim Shareware
Merstham, Royaume Uni
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00893521
Message ID:
00893529
Vues:
27
This message has been marked as the solution to the initial question of the thread.
Hello Paul.

I want to find out the value of the selected cell in a grid programmatically, and I can't find how to do it.

The grid only has an active (selected) cell when the grid has focus. You can refer to This.Value in the selected cell. Or from elsewhere in the grid, you can use code like this:
*** Find out which column is the active column
WITH This
  FOR EACH loColumn IN .Columns
    IF loColumn.ColumnOrder = .ActiveColumn
      luValue = EVAL( loColumn.ControlSource )
      EXIT
    ENDIF
  ENDFOR
ENDWITH
To access the data in the grid, you can just refere to its underlying RecordSOurce using Alias.Field.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform