Changeset 7732
- Timestamp:
- 04/16/12 16:39:51 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.DataImporter/HeuristicLab.DataImporter.Command/ChangeColumnGroup/AddNewColumnCommandBase.cs
r7267 r7732 21 21 22 22 using System; 23 using System.Collections.Generic;24 23 using System.Linq; 25 using System.Text;26 using System.Xml;27 24 using HeuristicLab.DataImporter.Data.CommandBase; 28 25 using HeuristicLab.DataImporter.Data.Model; 29 using HeuristicLab.DataImporter.Data;30 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 31 27 … … 69 65 newColumn = (ColumnBase)Activator.CreateInstance(ColumnType, new object[] { this.ColumnName }); 70 66 newColumn.Resize(ColumnGroup.RowCount); 71 ColumnGroup.AddColumn(NewColumn); 67 68 ColumnBase cb = ColumnGroup.Columns.Where(x => x.Selected).FirstOrDefault(); 69 if (cb != null) { 70 ColumnGroup.InsertColumn(ColumnGroup.IndexOfColumn(cb) + 1, NewColumn); 71 } else { 72 ColumnGroup.AddColumn(NewColumn); 73 } 72 74 ColumnGroup.FireChanged(); 73 75 ColumnGroup = null;
Note: See TracChangeset
for help on using the changeset viewer.