Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - Does FindRow find hidden Rows?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Does FindRow find hidden Rows?

 Post Reply Post Reply
Author
Message
Shawshank View Drop Down
Senior Member
Senior Member


Joined: 16 October 2005
Status: Offline
Points: 117
Post Options Post Options   Thanks (0) Thanks(0)   Quote Shawshank Quote  Post ReplyReply Direct Link To This Post Topic: Does FindRow find hidden Rows?
    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?

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: 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
Back to Top
Shawshank View Drop Down
Senior Member
Senior Member


Joined: 16 October 2005
Status: Offline
Points: 117
Post Options Post Options   Thanks (0) Thanks(0)   Quote Shawshank Quote  Post ReplyReply Direct Link To This Post 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?

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: 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.
Back to Top
debehs View Drop Down
Newbie
Newbie


Joined: 30 December 2005
Location: Malaysia
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote debehs Quote  Post ReplyReply Direct Link To This Post 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.

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: 18 January 2006 at 10:25am

Just add to the last row:

   Set RptRow = wndReportControl.Rows.FindRow(record)

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