Print Page | Close Window

Selected Row Record Index Changes If Dragged

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=16572
Printed Date: 11 November 2024 at 7:19pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Selected Row Record Index Changes If Dragged
Posted By: AlexHancock
Subject: Selected Row Record Index Changes If Dragged
Date 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



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net