Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Multi select in a grid and a view question...
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00047415
Message ID:
00047468
Views:
28
>Part 1:
>I'm creating a view using the following syntax:
>
>CREATE SQL VIEW myview AS SELECT *, .f. AS lSelect FROM Inventory
>
>Is this safe? (I'm wondering because it seems to be unnatural use of a view)
>
>Part 2:
>My purpose for doing this is that this view is bound to a grid and I need the lSelect field to indicate that certain records are selected. I use the Dynamic ForeColor and BackColor of the cells to highlight 'selected' rows so they stand out to the user and appear as selected. The user can Shift-Click to select or deselect records.
>
>I arrived at this solution because I am trying to make a grid have multi-select capability like a listbox. I want the user to be able to select multiple records by shift-clicking, clicking and dragging, or using shift + arrow keys, has anyone seen code to make a grid act like this?

David,
Part 1: No problem. Looks funny I'll admit, but it is correct usage.

Part 2: Certainly this 'extra' field can be used to handle 'selected' rows, but have you tried working with a list instead of a view. If you aren't editing on the grid, the list has all of the multi-select options you need, and you can write code for handling selected items. Only the first item in a selected group will be dragged if you have the mover bars enabled, but you can program so it LOOKS like the selected batch is moved.

HTH
Barbara
Barbara Paltiel, Paltiel Inc.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform