Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/30/15 15:45:17 (9 years ago)
Author:
ehopf
Message:

#2335: Removed a redundant check and fixed a validation problem in the Datagrid-View (Defect 9). Additionally changed the validation in the Manipulation-View to disallow the thousands separator as input. This prevents the unintended usage of the thousands separator as comma which would result in a wrong result.

Location:
branches/DataPreprocessingImprovements/HeuristicLab.DataPreprocessing.Views/3.4
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/DataPreprocessingImprovements/HeuristicLab.DataPreprocessing.Views/3.4/DataGridContentView.cs

    r12543 r12555  
    126126
    127127      string errorMessage;
    128       if (Content != null) {
     128      if (!String.IsNullOrEmpty(e.FormattedValue.ToString())) {
    129129        if (dataGridView.IsCurrentCellInEditMode && Content.FilterLogic.IsFiltered) {
    130130          errorMessage = "A filter is active, you cannot modify data. Press ESC to exit edit mode.";
  • branches/DataPreprocessingImprovements/HeuristicLab.DataPreprocessing.Views/3.4/ManipulationView.cs

    r12502 r12555  
    2323using System.Collections.Generic;
    2424using System.Drawing;
     25using System.Globalization;
    2526using System.Linq;
    2627using System.Text;
     
    150151    private void validateDeleteColumnsInfo() {
    151152      validateDoubleTextBox(txtDeleteColumnsInfo.Text);
    152       if (btnApply.Enabled)
    153       {
     153      if (btnApply.Enabled) {
    154154        var filteredColumns = Content.ManipulationLogic.ColumnsWithMissingValuesGreater(getDeleteColumnsInfo());
    155155        int count = filteredColumns.Count;
     
    308308      if (!string.IsNullOrEmpty(text)) {
    309309        double percent;
    310         if (Double.TryParse(text, out percent)) {
     310        if (Double.TryParse(text, NumberStyles.Number ^ NumberStyles.AllowThousands, CultureInfo.CurrentCulture, out percent)) {
    311311          btnApply.Enabled = true;
    312312        }
Note: See TracChangeset for help on using the changeset viewer.