new_gridctrl


The new_gridctrl function returns a CGridCtrl object for the grid control in a CGridView window or modeless CGrid dialog. Note that this method cannot attach to a modal CGrid Dialog.

Syntax

G = new_gridctrl()

G = new_gridctrl( CGridCtrl_object )

G = new_gridctrl( CGridView_window_object )

G = new_gridctrl( CGrid_dialog_object )

bullet.gif    CGridCtrl_object is an existing CGridCtrl object to be copied.

bullet.gif    CGrid_dialog_object is a modeless dialog containing a CGrid. and opened using new_griddlg.

bullet.gif    CGridView_window_object is a CGridView object attached to a grid window.

bullet.gif    Returns a new CGridCtrl object or nil on failure.

Example

The following script attaches a CGridView object to a Mira desktop window and returns its CGridCtrl:

V = attach_gridview()

- attach a grid window from the Mira desktop.

G = new_gridctrl(V)

-- return the grid control from the CGridView

The following script creates a CGrid object using a GridParams table for initialization, fills it with data, opens it into a modeless dialog and returns its CGridCtrl:

Grid = new_grid(GridParams)

- create CGrid with properties from GridParams table

-- fill the CGrid with data...

 

D = new_griddlg(Grid)

-- open the CGrid into a modeless dialog D.

G = new_gridctrl(D)

-- return the grid control for the grid dialog

Related Topics

CGridCtrl class

CGridView class

CGrid class

attachlist_panegridctrl

new_gridview

new_grid

new_griddlg

new_griddlgmodal


Mira Pro x64 Script User's Guide, v.8.77 Copyright Ⓒ 2024 Mirametrics, Inc. All Rights Reserved.