/// <summary> /// 移除单元格 /// </summary> /// <param name="columnIndex">列索引</param> public void removeCell(int columnIndex) { int cellSize = m_cells.size(); if (columnIndex >= 0 && columnIndex < cellSize) { FCGridCell cell = m_cells.get(columnIndex); if (cell.Column.Index == columnIndex) { m_cells.remove(cell); cell.onRemove(); return; } for (int i = 0; i < cellSize; i++) { cell = m_cells.get(i); if (cell.Column.Index == columnIndex) { m_cells.remove(cell); cell.onRemove(); break; } } } }
/// <summary> /// 移除单元格 /// </summary> /// <param name="columnName">列名</param> public void removeCell(String columnName) { int cellSize = m_cells.size(); for (int i = 0; i < cellSize; i++) { FCGridCell cell = m_cells.get(i); if (cell.Column.Name == columnName) { m_cells.remove(cell); cell.onRemove(); break; } } }