Print Page | Close Window

Does FindRow find hidden Rows?

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=3433
Printed Date: 12 May 2024 at 8:21am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Does FindRow find hidden Rows?
Posted By: Shawshank
Subject: Does FindRow find hidden Rows?
Date Posted: 22 December 2005 at 12:26am

I have a Record whose visible property is set to False. If I use the .FindRow method to locate the Row this hidden Record is associated with it fails to locate it. I tried setting the Record's visible property to True before calling .FindRow but for some reason it remains False.

Should .FindRow be able to locate a Row when the Record's visible property is set to False?




Replies:
Posted By: sserge
Date Posted: 24 December 2005 at 11:20am
Hi,

Actually this behavior is correct. Please note the difference before and  after calling Populate() method. When you set Visibility of the Record to True and call Populate(), it creates a corresponding Row, but when Visibility is False, a corresponding Row is not created at all. That’s why FindRow() can not find it.

So, if you first set Visible to True, then call Populate(), and finally call   FindRow() – it will be found.

--
HTH,
Serge


Posted By: Shawshank
Date Posted: 24 December 2005 at 2:53pm

I don't see any way to set the Visibile property back to True once you set it to False. There seems to be no way to get a reference to it in order to modify the property back to True. FindRow doesn't get a reference nor does iterating through the Rows collection.

So how does one do it?



Posted By: sserge
Date Posted: 25 December 2005 at 4:01am
You can always iterate the collection of Records, which contain both visible and not, and change Visible property for any of them. After that call Populate to recreate corresponding Rows.


Posted By: debehs
Date Posted: 18 January 2006 at 9:58am

May I know how can use the findRow?

I tried this

    Dim record As ReportRecord
    Dim RptRow As ReportRow
   
    Set record = wndReportControl.Records.Add()
    record.AddItem 123
    wndReportControl.Populate
    RptRow = wndReportControl.Rows.FindRow(record)

 

but no luck, the code stuck at the last row.



Posted By: sserge
Date Posted: 18 January 2006 at 10:25am

Just add to the last row:

   Set RptRow = wndReportControl.Rows.FindRow(record)

--
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