Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Report Control
  New Posts New Posts RSS Feed - Selected Row Record Index Changes If Dragged
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Selected Row Record Index Changes If Dragged

 Post Reply Post Reply
Author
Message
AlexHancock View Drop Down
Newbie
Newbie


Joined: 11 April 2010
Location: United Kingdom
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote AlexHancock Quote  Post ReplyReply Direct Link To This Post Topic: Selected Row Record Index Changes If Dragged
    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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.172 seconds.