Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Multiselect in GRID ?
Message
From
25/10/2002 06:01:34
 
 
To
25/10/2002 00:35:58
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00715266
Message ID:
00715323
Views:
12
Hi John.

hi, please i need to make a multiselect in a grid is it possible?

The first thing you need to do is set up a local view to use a the RecordSource for your grid. For example, if you were using the grid to select customers, you could define the view like this:
SELECT .F. AS lselected, *;
 FROM customer ORDER BY Customer.company
Next you have to set up your grid. Drop a Checkbox into the column that is boud to the lSelected field (I assume this will be the first column). Use these steps to do this:

1. Select the grid colum in the drop down list at the top of the property sheet
2. Click on the check box in the form controls toolbox
3. Click on the grid column that you want to display the check box

Next Set these properties on the grid column with the check box:

Sparse = .F.
CurrentControl =

This code goes in the grid's Init()
*** Set up for highlighting 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' )
HTH.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform