Print Page | Close Window

SelectedRows collection = broken

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=4368
Printed Date: 06 July 2025 at 7:56am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: SelectedRows collection = broken
Posted By: tigger
Subject: SelectedRows collection = broken
Date 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

https://forum.codejock.com/uploads/tigger/2006-06-07_063524_ReportControl.zip - 2006-06-07_063524_ReportControl.zip




Replies:
Posted By: tigger
Date 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



Posted By: sserge
Date 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



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