Free cookie consent management tool by TermsFeed Policy Generator

Changeset 16817


Ignore:
Timestamp:
04/18/19 14:07:11 (5 years ago)
Author:
chaider
Message:

#2971 fixed sorting of columns in NamedIntervalsView

Location:
branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/NamedIntervalsView.Designer.cs

    r16581 r16817  
    4040      this.dataGridView.TabIndex = 0;
    4141      this.dataGridView.CellEndEdit += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_CellEndEdit);
     42      this.dataGridView.CellValidated += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_CellValidated);
    4243      this.dataGridView.CellValidating += new System.Windows.Forms.DataGridViewCellValidatingEventHandler(this.dataGridView_CellValidating);
    4344      this.dataGridView.CellValueChanged += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_CellValueChanged);
  • branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/NamedIntervalsView.cs

    r16730 r16817  
    153153      dataGridView.Rows[e.RowIndex].ErrorText = string.Empty;
    154154    }
     155
     156    private void dataGridView_CellValidated(object sender, DataGridViewCellEventArgs e) {
     157      var col = e.ColumnIndex;
     158      var row = e.RowIndex;
     159      if (double.TryParse(dataGridView.Rows[row].Cells[col].Value.ToString(), out var value))
     160        dataGridView.Rows[row].Cells[col].Value = value;
     161    }
    155162  }
    156163}
Note: See TracChangeset for help on using the changeset viewer.