AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Funciones WLanguage / Controles, páginas y ventanas / Funciones Looper
  • Use conditions
  • Sort
  • Looper bound to a data source and using a programmed iteration
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
Allows sorting a Looper control according to one or more of its attributes.
Ejemplo
// Sort according to one of the Looper control attributes selected in a Radio Button control
SWITCH RADIO_RADIO1
	CASE 1: ZR_Client.Sort("NAME")
	CASE 2: ZR_Client.Sort("COMPANY")
	CASE 3: ZR_Client.Sort("CITY")
END
Sintaxis

Sorting a Looper control according to a list of attributes Ocultar los detalles

<Result> = <Looper control>.Sort(<List of attributes>)
<Result>: Boolean
  • True if the sort was performed,
  • False otherwise.
<Looper control>: Control name
Name of the Looper control to be used.
<List of attributes>: Character string
Name of the attributes according to which the Looper control will be sorted (up to 10 attributes). This character string must have the following format:
"[<Direction>]<Attribute 1>" + TAB + "[<Direction>]<Attribute 2>" + TAB + ...
with:
  • <Sens> Sort direction (optional), can take the following values:
    • "+": sorting will be ascending (default value).
    • "-": sorting will be in descending order.
  • <Attribut>: name of the attribute used for sorting.
WEBDEV - Código Navegador In browser code, the sort can be performed on a single attribute only.
Observaciones

Use conditions

La función <Looper>.Sort puede utilizarse en:
  • un control Looper basado en un archivo de datos,
  • un control Looper rellenado mediante programación.
WEBDEV - Código Navegador Esta función no está disponible para los controles Looper lineales. Esta función sólo está disponible para los controles Looper en modo navegador.
WEBDEV - Código ServidorPHP Esta función está disponible para los controles Looper en modo AJAX, los controles Looper en modo clásico y los controles Looper lineales.

Sort

The sort will be taken into account during the next addition of a row into the Looper control (<Looper>.Add, <Looper>.AddLine, <Looper>.Insert and <Looper>.InsertLine).

Looper bound to a data source and using a programmed iteration

<Looper>.Sort does not work on a Looper control with the following characteristics:
  • Looper control bound to a data source,
  • Looper control that uses Recorrer mediante programación ("Content" tab in the control description window).
To change the display order of a Looper control with programmed iteration, you must adapt the code found in the different read processes of the Looper control (process for reading the first one, the next one, the previous one, ...).
Componente: wd300obj.dll
Versión mínima requerida
  • Versión 23
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 27/03/2025

Señalar un error o enviar una sugerencia | Ayuda local