Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - Lost selection after repopulating l
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Lost selection after repopulating l

 Post Reply Post Reply
Author
Message
Fabian View Drop Down
Senior Member
Senior Member
Avatar

Joined: 22 November 2004
Location: Switzerland
Status: Offline
Points: 336
Post Options Post Options   Thanks (0) Thanks(0)   Quote Fabian Quote  Post ReplyReply Direct Link To This Post Topic: Lost selection after repopulating l
    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
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post 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....
Back to Top
Fabian View Drop Down
Senior Member
Senior Member
Avatar

Joined: 22 November 2004
Location: Switzerland
Status: Offline
Points: 336
Post Options Post Options   Thanks (0) Thanks(0)   Quote Fabian Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post 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....
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post 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....
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.