Usina BRAdvPL Guide
Sign in
← All topics
CLASSUnder review

MSGetDados

MsGetDados():New(nTop,nLeft,nBottom,nRight,nOpc,[cLinhaOk],[cTudoOk],[cIniCpos],[lDeleta],[aAlter],[nFreeze],[lEmpty],[nMax],[cFieldOk],[cSuperDel],[uPar],[cDelOk],[oWnd],[lUseFreeze],[cTela])

Maintains a legacy grid backed by aHeader and aCols.

MSGetDadosAdvPL
01 · OVERVIEW

Overview

TOTVS marks MsGetDados deprecated and recommends Protheus MVC for new work. The grid uses Private aRotina, aHeader, aCols and lRefresh. aCols follows header fields plus a logical deletion column. Documented properties include aAlter (editable fields), nMax (row limit) and lDeleta (enable deletion). Syntax below lists the constructor; this page’s method catalog is a maintenance subset, not the entire API. (Sources: refs. 1–1.)

02 · SYNTAX

Syntax

MsGetDados():New(nTop,nLeft,nBottom,nRight,nOpc,[cLinhaOk],[cTudoOk],[cIniCpos],[lDeleta],[aAlter],[nFreeze],[lEmpty],[nMax],[cFieldOk],[cSuperDel],[uPar],[cDelOk],[oWnd],[lUseFreeze],[cTela])

Parameters

nTop
NumericRequired

Top bound.

nLeft
NumericRequired

Left bound.

nBottom
NumericRequired

Bottom bound.

nRight
NumericRequired

Right bound.

nOpc
NumericRequired

Action position in aRotina.

Methods

NewConstructor: requires prepared Private context and container.MsGetDados():New(nTop,nLeft,nBottom,nRight,nOpc,[cLinhaOk],[cTudoOk],[cIniCpos],[lDeleta],[aAlter],[nFreeze],[lEmpty],[nMax],[cFieldOk],[cSuperDel],[uPar],[cDelOk],[oWnd],[lUseFreeze],[cTela])
Return value

Class instance.

EnableEnables interaction.oGrid:Enable()
DisableDisables interaction.oGrid:Disable()
ForceRefreshRefreshes its data source and moves to the first row.oGrid:ForceRefresh()

Return value

New returns the object; this example does not use the other methods’ returns.

03 · PRACTICAL EXAMPLE

Commented example

#Include "Protheus.ch"

User Function Ed541()
    // Requires an object already built in the correct dialog; block not invoked.
    Local bRefresh := {|oGrid| oGrid:ForceRefresh()}
    ConOut(ValType(bRefresh))
Return Nil
Expected result

Prints B. When invoked with a valid object, refresh may change the current row. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

BEST PRACTICES
  • Check the signature and all optional arguments in the source before construction. Restore work areas and release resources on errors. Refresh does not save data; preserve user selection and validate rows before persistence.
  • Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

Related content

REFERENCES
  1. TOTVS. MsGetDados. TDN. 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