Print Page | Close Window

How to insert record in a specific position

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=19538
Printed Date: 17 June 2024 at 2:14pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: How to insert record in a specific position
Posted By: sosepe
Subject: How to insert record in a specific position
Date Posted: 01 March 2012 at 5:29am
Hello, it's possible to insert a new record in a specific position?

Example:
i have a reportcontrol with 3 records:
rec1
rec2
rec3

how to insert a new record between rec2 and rec3 withouth delete all records and reinsert all?

rec1
rec2
new record
rec3

Many Many thanks!!

I hade CodeJock v15.1.3.0908





Replies:
Posted By: Peter59
Date Posted: 02 March 2012 at 7:05am
from the provided help file:

Insert Method

Description
Inserts a new record\row at the specified position in the collection of records

Syntax
Public Function Insert(  ByVal Index As Long ) As ReportRecord

Parameters
Index The position in the collection of records to insert this record.


    Dim Record As ReportRecord
    Dim Item   As ReportRecordItem

    'Inserts a new Record\Row in the 3th row of the ReportControl
    Set Record = wndReportControl.Records.Insert(2)

    Set Item = Record.AddItem("")
        Item.HasCheckbox = True
        Item.Checked = False
    Record.AddItem "RE: Your Invoice"
    Record.AddItem "John Smith"
    Record.AddItem "19/06/2004"
    Record.AddItem "18k"

    wndReportControl.Populate



-------------
Product: Xtreme SuitePro (ActiveX) version 15.2.1
Platform: Windows 7 64 Bit
Language: Visual Basic 6.0 SP6


Posted By: sosepe
Date Posted: 08 March 2012 at 6:45am
Many Many thanks for the reply !




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