PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
  • Use conditions
  • Adding an empty Repetition
  • Characteristics of the row
  • Sort
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Inserts a row into a browsing or memory Looper control.
Remark: To add elements at the end of Looper control, use <Looper>.AddLine.
Example
// Ajout de valeurs dans le champ Zone répétée en 12ème position
ZR_Zone1.InsèreLigne(12, Nom, Prénom, NumTel, NumFax)
// Insertion d'informations recherchées dans la base de données
i est un entier = 1
ZR_REPETE1.SupprimeTout()
HLitRecherche(Produit, NomProd, "Fenêtre")
TANTQUE HEnDehors() = Faux
ZR_REPETE1.InsèreLigne(i, Produit.NomProd, Produit.Code)
HLitSuivant(Produit, NomProd)
i ++
FIN
Syntax

Inserting a row in a Looper control with attributes Hide the details

<Looper control>.InsertLine([<Subscript> [, <Value 1> [, <Value N>]]])
<Looper control>: Control name
Name of Looper control to use.
<Subscript>: Optional integer
Subscript of row from which the new row will be inserted.
  • If this parameter is not specified or if it is equal to -1, the insertion will be performed before the current row. If no row is selected, the insertion will be performed at the end of Looper control.
  • If <Subscript> is greater than the number of rows, the insertion will be performed at the end of Looper control. In this case, <Looper>.InsertLine is equivalent to <Looper>.AddLine.
  • If this parameter is equal to 0, the insertion will be performed at the beginning of Looper control.
<Value 1>: Type of associated attribute (optional)
Value of 1st attribute for the row to insert into the specified Looper control.
The different values must be specified in the order of the attributes (Looper control description window).
To specify no value for one of the attributes, use an empty string ("") or 0 (depending on the type of attribute).
If none of these parameters is specified, an empty row is inserted into the Looper control.
<Value N>: Type of associated attribute (optional)
Value of N attribute for the row to insert into the specified Looper control.
The different values must be specified in the order of the attributes (Looper control description window).
To specify no value for one of the attributes, use an empty string ("") or 0 (depending on the type of attribute).
If none of these parameters is specified, an empty row is inserted into the Looper control.
Reports and Queries

Inserting a row in a Looper control without attributes Hide the details

<Looper control>.InsertLine([<Subscript>])
<Looper control>: Control name
Name of Looper control to use.
<Subscript>: Optional integer
Subscript of row from which the new row will be inserted.
  • If this parameter is not specified or if it is equal to -1, the insertion will be performed before the current row. If no row is selected, the insertion will be performed at the end of Looper control.
  • If <Subscript> is greater than the number of rows, the insertion will be performed at the end of Looper control. In this case, <Looper>.InsertLine is equivalent to <Looper>.AddLine.
  • If this parameter is equal to 0, the insertion will be performed at the beginning of Looper control.
Remarks

Use conditions

<Looper>.InsertLine can be used on a browsing or memory Looper control.

Adding an empty Repetition

Once an empty row was added, each attribute or each control must be initialized one by one.
For example:
  • For a Looper control with attributes:
    // Ajout d'une répétition vide
    ZR_REPETE1.InsèreLigne(14)
     
    // Puis initialisation des attributs
    AttributNom[14] = "Hobbes"
    AttributPrénom[14] = "Samantha"
    AttributCouleurPrénom[14] = RougeClair
    AttributVisibleAdresse[14] = Faux
  • For a Looper control without attributes:
    // Ajout d'une répétition vide
    ZR_REPETE1.InsèreLigne(14)
     
    // Puis initialisation des champs
    ZR_Zone1[14].ChampNom = "Hobbes"
    ZR_Zone1[14].ChampPrénom = "Samantha"
    ZR_Zone1[14].ChampPrénom.CouleurFond = RougeClair
    ZR_Zone1[14].ChampAdresse.Visible = Faux

Characteristics of the row

If a value corresponds to the result of a calculation, the numeric expression must be enclosed in brackets.
For example:
ZR_ZoneCalcul.InsèreLigne(10, (53+29), (83-21))

Sort

<Looper>.InsertLine ignores the sort.
Component: wd270obj.dll
Minimum version required
  • Version 23
This page is also available for…
Comments
Click [Add] to post a comment