ui.showGridViewerDialog
Description
Shows a grid viewer dialog containing the specified cells data.

Parameters
caption string (window title)
cells 2D array (in format [yRow][xCol])
hasHeaderRow boolean (place first row in column headers)

Return value
dialogWindowHandle integer

Example:
: 1
    local cells = data.createGrid()

    -- header row
    data.setCell(cells, 1, 1, "Col 1")
    data.setCell(cells, 2, 1, "Col 2")

    -- row 2
    data.setCell(cells, 1, 2, "Apple")
    data.setCell(cells, 2, 2, "Banana")

    -- row 2
    data.setCell(cells, 1, 3, "Red/green")
    data.setCell(cells, 2, 3, "Yellow")

    -- show data in dialog
    ui.showGridViewerDialog("Fruit Data", cells, true)

Comments

See also
ui.showCSVViewerDialog

Back
Generated on the 26 June 2024 at 22:01:29 (UK Time)