CGridView:ToTable
The ToTable method creates a 2-dimensional table containing the cell values from the grid. Each row of the returned table contains a 1-dimensional table of data from the columns of that row. Also see the inverse operation, FromTable. This method returns the contents of the range of cells contianing data. For example, if a table has 200 rows and 50 columns, but only the first 8 rows and 23 columns contain data, then the returned table will have 8 rows of 23 columns each. You can determine the maximum column and row numbers containing data using the GetMaxCol and GetMaxRow methods.
lua_table = CGridView:ToTable()
The returned lua_table is a 2-dimensional table containing the cell values of the table, organized in row order.
On failure, nil is returned.
The following script returns the entire grid contents as a 2-dimensional table:
|
-- create CGridView with default properties |
|
-- returns a table containing the cell data. |
|
-- list the values of the table. |
Mira Pro x64 Script User's Guide, Copyright Ⓒ 2023 Mirametrics,
Inc. All Rights Reserved.