Selected Row Record Index Changes If Dragged |
Post Reply |
Author | |
AlexHancock
Newbie Joined: 11 April 2010 Location: United Kingdom Status: Offline Points: 1 |
Post Options
Thanks(0)
Posted: 11 April 2010 at 9:23am |
Hello All
My first post so I'd like to thank everyone for their posts which have helped me so far.
However, I've found something unusual.
I have a report control containing a couple of hundred rows grouped (and therefore sorted) by two columns. If I select the fifth row, for example, and then run these commands (I've simplified the code slightly)
Position = pReport->GetSelectedRows()->GetFirstSelectedRowPosition();
pRow = pReport->GetSelectedRows()->GetNextSelectedRow(Position);
pRecord = pRow->GetRecord();
nIndex = pRecord->GetIndex();
nIndex contains 40.
However, if I select the fifth row and then drag it off the report and drop it onto a tree control and then run the above commands, nIndex contains 5! In both situations the Row's record is the same but their indexes are different. As I'm trying to use some details of the selected row to modify the tree I need to be able to identify which record is being dragged. I would have used the clipboard text but it only contains visible columns and key information is held in the hidden grouped columns.
Anyone have any ideas about what's happening?
Thanks
Alex
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |