Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grids - Multi-select - Is it possible?
Message
From
05/03/2008 16:43:59
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01298851
Message ID:
01299116
Views:
17
>>>Hi All,
>>>
>>>With a grid in vfp8, is it possible to get it to do multi-selection of the records?
>>>
>>>Can you point me to some examples?
>>>
>>>I have a single table, that I need to allow the user to view and delete or undelete as needed. No other editing of record is allowed. But they want to be able to highlight several rows and hit a button to mark records as deleted.
>>>
>>>TIA
>>>Beth
>>
>>Okay, I did mix of both Sergey’s and Naomi’s suggestions.
>>
>>I copy the table into a cursor with an extra field for ‘marked for deletion’ and do my work on that. When they hit the buttons, then I loop through the cursor and mark the records in the table that match the records in the cursor. And refresh the cursor after action is done.
>>
>
>Out of curiosity, how does the user flag a range of records for deletion as you described? How do you detect the Shift-click and update the cursor?

The user selects the records in the listbox. Listbox automaticly controls which records have been selected. Then they click the delete button, and I loop through the listbox selected records and mark the real records in the real table to deleted. Same thing for undelete, except I recall the records, not delete.


>
>PS -- I think you gave yourself solution stars ;-)
Yes, because no gave me an exact solution, I pieced it together from several answers, and then gave my solution as the solution. >:)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform