private bool removeEmptyLastRows() { if (!allowAddRows) { return(false); } bool _removed = false; while (rowCount > 1) { PM_GridRow _row = row(rowCount - 1); PM_GridRow _rowbefore = row(rowCount - 2); if (_row != null && _rowbefore != null && !_row.hasValues() && !_rowbefore.hasValues()) { __model.removeRow(rowCount - 1); _removed = true; } else { break; } } return(_removed); }
public bool hasValues(int _rowIndex) { Contract.Requires(_rowIndex >= 0 && _rowIndex < rowCount); PM_GridRow _row = row(_rowIndex); return(_row != null && _row.hasValues()); }