[SOLVED] SelectionChanged don't fires sometimes! |
Post Reply |
Author | |
Jebo
Senior Member Joined: 27 October 2005 Location: Germany Status: Offline Points: 318 |
Post Options
Thanks(0)
Posted: 12 March 2011 at 3:32pm |
Hello CJ-Team,
the "SelectionChanged" Event doesn't fires, if some records are invisible! Please see the attached sample-code for a better understanding. >>> uploads/1570/ReportControl_SelectAll_Bug.zip Please, is there a workaround or fix available - or do I something wrong? |
|
Peter59
Groupie Joined: 19 July 2007 Status: Offline Points: 61 |
Post Options
Thanks(0)
|
Hi Jebo,
I'm not from the CJ-Team but I can confirm your observation. A possible workaround could be to select all visible rows manually:
This works for me, see attached sample. uploads/3156/SelectionChanged_problem.zip Peter |
|
Product: Xtreme SuitePro (ActiveX) version 15.2.1
Platform: Windows 7 64 Bit Language: Visual Basic 6.0 SP6 |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi,
Fix: Don't know, guess you have to submit ticket
Workaround: Add a dummy record at the end and make sure this record is visible at all times.
In your case:
Private Sub ReportControl1_ValueChanged(ByVal Row As XtremeReportControl.IReportRow, ByVal Column As XtremeReportControl.IReportColumn, ByVal Item As XtremeReportControl.IReportRecordItem)
If ReportControl1.Navigator.CurrentFocusInHeadersRows Then Dim Rec As ReportRecord, sTmp As String, c As Long, R As Long sTmp = ReportControl1.HeaderRecords(0).Item(1).Value If sTmp <> "" Then For R = 0 To ReportControl1.Records.Count - 1 Set Rec = ReportControl1.Records(R) Rec.Visible = InStr(1, Rec.Item(1).Caption, sTmp, vbTextCompare) Next Else ' Make all records visible For R = 0 To ReportControl1.Records.Count - 1 ReportControl1.Records(R).Visible = True Next End If End If Me.ReportControl1.Records(Me.ReportControl1.Records.Count - 1).Visible = True
ReportControl1.Populate: ReportControl1_SelectionChanged
End Sub The thing is that RC scrolls to last record when selecting all records with CTRL-A but if only AAA is visible last record with FFF isn't visible anymore. That's why you need a 'last' record that is always visible.
|
|
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.... |
|
Jebo
Senior Member Joined: 27 October 2005 Location: Germany Status: Offline Points: 318 |
Post Options
Thanks(0)
|
Thank you guys!
Have opened a ticket and will try your workarounds. |
|
[Sig removed by Admin: Signature can't exceed 40GB]
|
|
Jebo
Senior Member Joined: 27 October 2005 Location: Germany Status: Offline Points: 318 |
Post Options
Thanks(0)
|
Sorry Peter, but this workaround doesn't work if the rows are grouped! I hope CJ will fix this bug with v15.0.3. |
|
[Sig removed by Admin: Signature can't exceed 40GB]
|
|
Peter59
Groupie Joined: 19 July 2007 Status: Offline Points: 61 |
Post Options
Thanks(0)
|
Doing it manually - second attempt!
Hi Jebo, with a little modification, CTRL+A will select all rows even when they are grouped:
See attached sample. uploads/3156/SelectionChanged_problem2.zip Peter |
|
Product: Xtreme SuitePro (ActiveX) version 15.2.1
Platform: Windows 7 64 Bit Language: Visual Basic 6.0 SP6 |
|
Jebo
Senior Member Joined: 27 October 2005 Location: Germany Status: Offline Points: 318 |
Post Options
Thanks(0)
|
Hi Peter,
thanks! I go this way: RecordsSelCount = 0 For Each Row In RepCtrl.SelectedRows RecordsSelCount = RecordsSelCount + 1 Next msgbox RecordsSelCount BUT your and my workaround is really slow! So I hope CJ will fix the SelRow-Counter! |
|
[Sig removed by Admin: Signature can't exceed 40GB]
|
|
ABuenger
Newbie Joined: 02 February 2006 Status: Offline Points: 1075 |
Post Options
Thanks(0)
|
Hi,
I can confirm that this is a bug in 15.0.2. I'll fix it for 15.0.3 tomorrow. As a workaround the following code should work: Private Sub ReportControl1_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = vbKeyA And Shift = 2 Then ReportControl1_SelectionChanged End If End Sub Andre |
|
Codejock support
|
|
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 |