Print Page | Close Window

Lost selection after repopulating l

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=10634
Printed Date: 20 September 2024 at 10:31am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Lost selection after repopulating l
Posted By: Fabian
Subject: Lost selection after repopulating l
Date Posted: 15 May 2008 at 7:39am
Hi
 
I use a report control in multi selection mode. Selecting a few rows - OK. Then I change sort order by clicking the appropriate column header. This operation destroys my selection but the last row.
 
The same if I change the sort order programmatically.
 
Is this a feature or a bug. In my opinion selection should be retained also the sort order was changed.
 
Thanks
 
Using: V12, VB6/SP6 under Win2000 and Vista


-------------
Product: Xtreme SuitePro (ActiveX) version 16.2.3

Platform: Windows 7 (32bit)

Language: Visual Basic 6.0 / SP6



Replies:
Posted By: Aaron
Date Posted: 15 May 2008 at 8:44am
Hi,
 
After repopulating most references will be lost
 
Expanded rows
Selected rows
 
maybe there are more....
 
Before calling Populate store the selected rows (use record index and not row index, they will be different after populating) in an array and after Populate loop the array and select the rows again.
 
 


-------------
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....


Posted By: Fabian
Date Posted: 15 May 2008 at 11:16am
Hello aaron
 
Many thanks. This should work. But it would be much more elegant and speedier if the control keeps this properties by itself...


-------------
Product: Xtreme SuitePro (ActiveX) version 16.2.3

Platform: Windows 7 (32bit)

Language: Visual Basic 6.0 / SP6


Posted By: Aaron
Date Posted: 15 May 2008 at 11:46am
Hi,
 
When the control would hold the references of the selected rows it would be easier, thats correct. But how would the reportcontrol "know" to delete all references? As I was typing this I wondered why not.
 
Please look at the SelectedRows class. You can add a selected row to the collection and DeleteAll if you want to.


-------------
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....


Posted By: Aaron
Date Posted: 15 May 2008 at 11:57am
Originally posted by Aaron Aaron wrote:

Hi,
 
When the control would hold the references of the selected rows it would be easier, thats correct. But how would the reportcontrol "know" to delete all references? As I was typing this I wondered why not.
 
Please look at the SelectedRows class. You can add a selected row to the collection and DeleteAll if you want to.
 
And then again it's the same class  
 
 
sorry for the false alarm
 
 
 
 
 
 
 


-------------
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....



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