public int GetMaxColumnIndexDefined() { if (ColumnsDef.Count > 0) { return(ColumnsDef.Max(cd => cd.Index)); } else { return(-1); } }