Free cookie consent management tool by TermsFeed Policy Generator

Changeset 14548


Ignore:
Timestamp:
01/05/17 17:28:30 (8 years ago)
Author:
pfleck
Message:

#2714 Improved the deleting of columns, to allow deleting multiple columns at once.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/DataGridContentView.cs

    r14443 r14548  
    554554      if (e.KeyCode == Keys.Delete) {
    555555        //Delete column
    556         if (dataGridView.SelectedColumns.Count == 1) {
    557           Content.DeleteColumn(dataGridView.SelectedColumns[0].Index);
     556        if (dataGridView.SelectedColumns.Count > 0) {
     557          var columnsToDelete = dataGridView.SelectedColumns.Cast<DataGridViewColumn>().OrderByDescending(col => col.Index).ToList();
     558          foreach (var col in columnsToDelete)
     559            Content.DeleteColumn(col.Index);
    558560        }
    559561        //Delete row
Note: See TracChangeset for help on using the changeset viewer.