Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid and Drag&Drop
Message
 
To
02/05/2002 11:14:22
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00651805
Message ID:
00651927
Views:
20
This message has been marked as a message which has helped to the initial question of the thread.
>identical cursors in both grids.
>However It should add the row above the one you clicked(not at the end of the cursor2). If you click at the bottom of the grid then it should add it to the bottom
>

The big question in this scenario is do you have the EXCLUSIVE use on these cursors?
The records can be physically inserted into the cursor at the desired place only with INSERT BLANK [BEFORE] command which requires the EXCLUSIVE use.

If the cursors are created with CREATE CURSOR or made updatable the other way, like
USE DBF("mycursor") AGAIN IN 0 ALIAS myUpdatableCursor
 or 
SELECT... INTO CURSOR ... READWRITE && for VFP 7 
then it is possible to do

If that is the table (or the table has to be updated to reflect the records order from the cursors), then the scenario is very limited and problematic because the EXCLUSIVE use does not go well with multi-user application. :)

Another way is to APPEND or INSERT INTO the dragged record at the end of the cursor and have the records somehow logically arranged in the desired order (probably using dummy field and index). Another way might be copying the records before the insertion point into another cursor, adding the dragged record, then copying the rest of records to it.

>When can we expect the class:)

It is basically ready right now for updating the fields/outside controls (like in Grid DragDropper 1.0) or whole records by Drag& Drop (not for INSERTing them, because of the above mentioned problems.

This is mostly not the technical problem, but the scenario/usage problem. There might not be the generic solution, but inserting the records by Drag&Drop can be done for some particular conditions and requirements.
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform