rows

Type: Integer

Availability: Read or write at run time only

The rows property contains the number of rows on the current sheet of a Table control.

Increasing the number of rows adds empty rows to that existing sheet. Decreasing rows deletes excess rows, discarding any existing data in those rows. Changing the rows property value to zero (0) empties the sheet of any data.

Changing the value of the rows property can affect the current values of the column, row, topRow, and leftColumn properties.

Rows can also be added by using the addItem or addItemAt methods. A specific row can also be deleted by using the removeItem method.

You can assign a maximum of 32,000 rows to a Table control. However, depending on the number of columns that are also assigned to the table, the amount of memory required to handle a large number of rows limits the number of rows that can be handled in practice.

The code fragments in the following examples show the use of the rows property.

foreach count in 1 to tblPortfolio.rows do
    tblPortfolio.row := count;
    if tblPortfolio.itemObject.Portfolio = saveObject then
        tblPortfolio.selected := true;
        break;
    endif;
endforeach;
// Remove empty rows so that the sort columns method will work
tbl.column := 1;
row := 1;
while row <= tbl.rows do
    tbl.row := row;
    if tbl.text = "" then
        tbl.deleteRow(row);
        // Move back one row otherwise you are working on the next row!
        row := row - 1;
    endif;
    row := row + 1;
endwhile;