Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Report Control
  New Posts New Posts RSS Feed - Selected rows lost after populate
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Selected rows lost after populate

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

Joined: 12 July 2010
Location: Netherlands
Status: Offline
Points: 180
Post Options Post Options   Thanks (0) Thanks(0)   Quote Willowmaster Quote  Post ReplyReply Direct Link To This Post Topic: Selected rows lost after populate
    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



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.109 seconds.