Tinygoldwing Posted December 4, 2023 Share Posted December 4, 2023 I'm trying to dragdrop between two dbgrids. I've set Handled to True so I can insert the data into dataset that I need. This works. It just always gets inserted at the bottom. My issue is that I need to drop into the destination grid between two rows. The dragdrop actually shows which row it should be inserted to. The columns are ordered by a field in the database called OrderPlc. This field usually isn't displayed, but this demo I'm showing it. Meaning if I have several rows displayed that are numbered between 1-11. When I dragdrop between row 3 & 4, I'm going to insert the new record and modify remaining OrderPlc by 1 to fix the numbers. But in order to do this I need to know the drop target row either the destination grid row number or destination datasource recno or the OrderPlc value from column two in the grid below. I've tried everything and it always returns 1 because that number is based off of the current selected row not the drop target. How do I get one of these values? In the grid below I need to return 4 so I can update the database. Thank You Ed Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.