Print Page | Close Window

Selected rows lost after populate

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=19358
Printed Date: 15 June 2025 at 4:06pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Selected rows lost after populate
Posted By: Willowmaster
Subject: Selected rows lost after populate
Date Posted: 28 December 2011 at 11:30am
Is it normal for the SelectedRows to have only one selected item after calling populate? Is there a setting to prevent this?
 
It can be reproduced using 15.2.1 and this code on a form with a button and a reportcontrol:
 
Private Sub Command1_Click()
    ReportControl1.SelectedRows.Add ReportControl1.Rows.Row(0)
    ReportControl1.SelectedRows.Add ReportControl1.Rows.Row(1)
    'ReportControl1.Populate
End Sub
Private Sub Form_Load()
    With ReportControl1
        .Columns.Add 0, "Test", 400, True
        .Columns.Add 1, "Test2", 400, True
        With .AddRecord
            .Item(0).Value = 0
            .Item(1).Value = "Test"
        End With
        With .AddRecord
            .Item(0).Value = 1
            .Item(1).Value = "Test2"
        End With
        With .AddRecord
            .Item(0).Value = 2
            .Item(1).Value = "Test3"
        End With
        .Populate
    End With
End Sub
 
If you uncomment the populate method the selection will be lost.


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

Platform: Windows XP (32bit) - SP 3 (on VMWare)

Language: Visual Basic 6.0






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