Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - SelectedRows collection = broken
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

SelectedRows collection = broken

 Post Reply Post Reply
Author
Message
tigger View Drop Down
Newbie
Newbie


Joined: 07 June 2006
Location: Netherlands
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote tigger Quote  Post ReplyReply Direct Link To This Post Topic: SelectedRows collection = broken
    Posted: 07 June 2006 at 6:38am

Hello all,

The SelectedRows property of the ActiveX ReportControl is broken.
If I use the foreach construct to iterate through the collection it properly returns the selected rows. But if I iterate through it again nothing is returned. If I retrieve the Count of the SelectedRows it shows the proper count, yet the foreach construct fails to return anything. Hence, it only works once!

I've attached an example of the project. Press the Delete key to display the selected items (nothing gets deleted actually ;). Notice that when pressing the Delete key twice it doesn't return the selected item(s) but the selected Count is > 0!

I'm using C# in Visual Studio 2005.

Please please help!

Erik

2006-06-07_063524_ReportControl.zip

Back to Top
tigger View Drop Down
Newbie
Newbie


Joined: 07 June 2006
Location: Netherlands
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote tigger Quote  Post ReplyReply Direct Link To This Post Posted: 07 June 2006 at 6:49am

I've found a workaround.

Call

ReportControl.SelectedRows.GetEnumerator().Reset();

before you use the foreach construct to reset the aparent static enumerator.

CodeJock, this should be done by the control and not by the user. At the very least put something in the documentation. Oh well, another day down the drain

Erik

Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post Posted: 08 June 2006 at 12:58pm
Thanks a lot for your notes and a solution, we'll see what is the problem with the control and will try to fix it by the next release...

--
WBR,
Serge
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.188 seconds.