Usina BRAdvPL Guide
Sign in
← All topics
FUNCTIONUnder review

GridReset and grid navigation

GridReset(oGrid); GridRow(oGrid) -> nRow; GridRows(oGrid) -> nVisible

Refreshes and reads navigation in a historical eADVPL grid.

GridReset and grid navigationAdvPL
01 · OVERVIEW

Overview

The guide distinguishes GridReset for refresh, GridRow for selected row and GridRows for visible rows; the latter is not the source record count. GridSetRow selects a row and GridLeft/GridRight move columns. This example prepares callbacks without executing against a nonexistent control. (Sources: refs. 1–1.)

02 · SYNTAX

Syntax

GridReset(oGrid); GridRow(oGrid) -> nRow; GridRows(oGrid) -> nVisible
03 · PRACTICAL EXAMPLE

Commented example

#Include "Protheus.ch"

User Function Ed477()
    // Historical subset; supply a grid from the corresponding runtime.
    Local bRefresh := {|oGrid| GridReset(oGrid)}
    Local bPosition := {|oGrid| {GridRow(oGrid),GridRows(oGrid)}}
    ConOut(ValType(bRefresh))
    ConOut(ValType(bPosition))
Return Nil
Expected result

Prepares refresh and reading without changing selection or source data. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

BEST PRACTICES
  • Check the actual class API; do not replace a modern component Refresh with a historical function without validation.
  • Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

Related content

REFERENCES
  1. Guia de Referência eADVPL (histórico). §§3.32–3.38. Accessed on 2026-10-27.
Status
Under review
Page created on
Last reviewed on
Original language
Portuguese
Reviewed by
Usina.BR
0 approved comment(s)

Comments

There are no approved comments yet.

Sign in with Google or Microsoft to comment.

Powered by Usina Docs · Alpha