GetColumnCount Function (DataGrid)

Class

DataGrid.

Action

Returns the number of columns in the row, including non-viewable (invisible) columns if specified.

Syntax

iCount = Datagrid.GetColumnCount(DataGridRow, [bAllColumns])
Variable Description
iCount The number of columns in the specified row. INTEGER.
DataGridRow The DataGridRow to count. DATAGRIDROW.
bAllColumns Optional: Scrolls to get all columns (see note below). Default is FALSE. BOOLEAN.

Note

To ensure that you get an accurate column count, you can specify GetColumnCount(TRUE), which will cause the application to scroll to the right of the datagrid, fetch all columns, and report the number of columns seen. This can take a lot of time, so only use this optional argument when needed.