/// <summary> /// Gets or sets the column with the specified name. /// </summary> public Column this[string columnName] { get { int index = GetIndex(columnName); if (index == -1 && string.IsNullOrEmpty(columnName) == false) { Column column = new UnknownColumn(columnName, m_Table); Add(column); return(column); } return(this[index]); } set { int index = GetIndex(columnName); if (index != -1) { this[index] = value; } else { Add(value); } } }
/// <summary> /// Gets or sets the column with the specified name. /// </summary> public RowCell this[string cellName] { get { int index = GetIndex(cellName); if (index == -1) { if (m_Row.m_Table.Columns.GetIndex(cellName) == -1) { UnknownColumn column = new UnknownColumn(cellName, m_Row.m_Table); m_Row.m_Table.Columns.Add(column); } RowCell cell = new RowCell(cellName, m_Row); Add(cell); return(cell); } return(this[index]); } set { int index = GetIndex(cellName); if (index != -1) { this[index] = value; } else { Add(value); } } }