Does FindRow find hidden Rows? |
Post Reply |
Author | |
Shawshank
Senior Member Joined: 16 October 2005 Status: Offline Points: 117 |
Post Options
Thanks(0)
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? |
|
sserge
Moderator Group Joined: 01 December 2004 Status: Offline Points: 1297 |
Post Options
Thanks(0)
|
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 |
|
Shawshank
Senior Member Joined: 16 October 2005 Status: Offline Points: 117 |
Post Options
Thanks(0)
|
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? |
|
sserge
Moderator Group Joined: 01 December 2004 Status: Offline Points: 1297 |
Post Options
Thanks(0)
|
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.
|
|
debehs
Newbie Joined: 30 December 2005 Location: Malaysia Status: Offline Points: 7 |
Post Options
Thanks(0)
|
May I know how can use the findRow? I tried this Dim record As ReportRecord
but no luck, the code stuck at the last row. |
|
sserge
Moderator Group Joined: 01 December 2004 Status: Offline Points: 1297 |
Post Options
Thanks(0)
|
Just add to the last row: Set RptRow = wndReportControl.Rows.FindRow(record) -- |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |