Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid Design
Message
From
26/08/1999 13:19:12
 
 
To
26/08/1999 03:36:40
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00257757
Message ID:
00258044
Views:
20
>I am using VFP6 and I wish to have a grid imitate the features of a list box. That is, select an entire row instead of a particular cell. Can you be of assistance. Please mail me at alexyeboah@hotmail.com or on this forum.
>
> Thanks.

GRid don't have a ative Multiselect feature, but you can emulate one with an extra field in the underlying cursor. Add a logical field called selected or something, and put something like this in the grid's init:

THIS.SetAll("DynamicBackColor","IIF(Selected, 16711680, 16777215)")

This turns all rows blue for records whose selected field is true. Then, put code is each control in the grid (textboxes, or whatever) that toggles the Selected field in the click event:

REPLACE Selected WITH !SELECTED

When the user is done selecting choices, and you need to do something with the selected records, just SCAN FOR selected.
Erik Moore
Clientelligence
Previous
Reply
Map
View

Click here to load this message in the networking platform