Lost selection after repopulating l |
Post Reply |
Author | |
Fabian
Senior Member Joined: 22 November 2004 Location: Switzerland Status: Offline Points: 336 |
Post Options
Thanks(0)
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 |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
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.... |
|
Fabian
Senior Member Joined: 22 November 2004 Location: Switzerland Status: Offline Points: 336 |
Post Options
Thanks(0)
|
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 |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
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.... |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
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.... |
|
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 |