Print Page | Close Window

RemoveAt + Populate (revisited for child records)

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=8005
Printed Date: 10 November 2024 at 2:04am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: RemoveAt + Populate (revisited for child records)
Posted By: elmsoftware
Subject: RemoveAt + Populate (revisited for child records)
Date Posted: 14 September 2007 at 2:40pm

NightHawk helped me earlier with a previous post about deleting a record using 'RemoveAt' + 'Populate' + 'TopRowIndex' to establish a familar deleting effect of a row.

https://forum.codejock.com/forum_posts.asp?TID=7998 - https://forum.codejock.com/forum_posts.asp?TID=7998
 
Now, I have records that have 'Child' records.
When performing the same method of:
 
    lngTopRow = rpt.TopRowIndex

    rpt.Records.RemoveAt (Row.Record.Index)

    rpt.Populate

    rpt.TopRowIndex = lngTopRow
 
This code will not remove the child record.
 
What is the recommended practice for removing a child record.
 



Replies:
Posted By: sserge
Date Posted: 20 September 2007 at 5:32pm

lngTopRow = rpt.TopRowIndex
Row.Record.DeleteAll
rpt.Records.RemoveAt (Row.Record.Index)
rpt.Populate
rpt.TopRowIndex = lngTopRow


--
WBR,
Serge


Posted By: elmsoftware
Date Posted: 20 September 2007 at 10:34pm
Much appreciated.



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