Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Selecting rows in a grid
Message
De
13/03/2002 19:49:31
 
 
À
13/03/2002 19:17:57
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00632491
Message ID:
00632500
Vues:
30
I've been checking a class which allow me to select multiple records on grid ( got it on vfug).

The way that I usually do this is to add a logical field to the view that I use as the RecordSource for the grid and call this field lSelected. I then drop a graphical style checkbox into the column that is bound to the lSelected field.

Very easy. No muss. No Fuss. No API calls. No SHIFT-Click.

Code like this in the grid's Init() automatically hightlights all selected rows:
This.SetAll( 'DynamicForeColor', ;
	'IIF( lSelected, RGB( 0, 0, 128 ), RGB( 0, 0, 0 ) )', 'COLUMN' )
This.SetAll( 'DynamicBackColor', ;
	'IIF( lSelected, RGB( 0,255,255 ), RGB( 255, 255, 255 ) )', 'COLUMN' )
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform