Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        public bool hasValues(int _rowIndex)
        {
            Contract.Requires(_rowIndex >= 0 && _rowIndex < rowCount);
            PM_GridRow _row = row(_rowIndex);

            return(_row != null && _row.hasValues());
        }