Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Way to update only the changed row grid color
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01416806
Message ID:
01416820
Vues:
61
>I have SetAll in .init already and that's fine for when I load the form, but I want to set the color myself for just the row the user updates.
>Actually the user has focus on a textbox where they use a barcode scanner to input a value, then I want to locate the row and change the color of that row. The criteria would be the same but the scope really only needs to be that one record at that point.

Your code should evaluate new form property, e.g. gridrecno. In Grid.BeforeRowColumnChange you will set this property:
Thisform.gridrecno=recno(this.recordsource)
and in Grid.AfterRowColumnChange you will check if grid.refresh is required,
If Thisform.gridrecno=recno(this.recordsource)
  return
endif
This.Refresh
DynamicColor expressions should evaluate if Thisform.gridrecno=recno('gridsourcealias'). By the way, you don't need to include long expressions there. You may just have form's method called, e.g.
This.Column1.DynamicBackColor="0+thisform.setgridcolor()"
The first thing in Setgridcolor would be checking Thisform.gridrecno.
Edward Pikman
Independent Consultant
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform