Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Selecting rows in a grid
Message
From
13/03/2002 19:49:31
 
 
To
13/03/2002 19:17:57
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00632491
Message ID:
00632500
Views:
29
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' )
Previous
Reply
Map
View

Click here to load this message in the networking platform