Index: /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/DataGridContentView.Designer.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/DataGridContentView.Designer.cs	(revision 10236)
+++ /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/DataGridContentView.Designer.cs	(revision 10236)
@@ -0,0 +1,33 @@
+﻿namespace HeuristicLab.DataPreprocessing {
+  partial class DataGridContentView {
+    /// <summary>
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary>
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing && (components != null)) {
+        components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Windows Form Designer generated code
+
+    /// <summary>
+    /// Required method for Designer support - do not modify
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      this.components = new System.ComponentModel.Container();
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.Text = "DataGridContentView";
+    }
+
+    #endregion
+  }
+}
Index: /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/DataGridContentView.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/DataGridContentView.cs	(revision 10236)
+++ /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/DataGridContentView.cs	(revision 10236)
@@ -0,0 +1,38 @@
+﻿
+using System.Windows.Forms;
+using HeuristicLab.Core.Views;
+using HeuristicLab.MainForm;
+using HeuristicLab.MainForm.WindowsForms;
+using HeuristicLab.Problems.DataAnalysis;
+using HeuristicLab.Data.Views;
+
+namespace HeuristicLab.DataPreprocessing {
+  [View("Data Grid Content View")]
+  [Content(typeof(IDataGridContent), false)]
+  public partial class DataGridContentView : StringConvertibleMatrixView {
+
+    public new IDataGridContent Content {
+      get { return (IDataGridContent)base.Content; }
+      set { base.Content = value; }
+    }
+
+    public DataGridContentView() {
+      InitializeComponent();
+    }
+
+    protected override void OnContentChanged() {
+      base.OnContentChanged();
+
+    }
+
+    private void dataGridView_CellValidating(object sender, DataGridViewCellValidatingEventArgs e) {
+      if (!dataGridView.ReadOnly) {
+        string errorMessage;
+        if (Content != null && !Content.Validate(e.FormattedValue.ToString(), out errorMessage, e.ColumnIndex)) {
+          e.Cancel = true;
+          dataGridView.Rows[e.RowIndex].ErrorText = errorMessage;
+        }
+      }
+    }
+  }
+}
Index: /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/HeuristicLab.DataPreprocessing-3.3.csproj
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/HeuristicLab.DataPreprocessing-3.3.csproj	(revision 10235)
+++ /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/HeuristicLab.DataPreprocessing-3.3.csproj	(revision 10236)
@@ -84,9 +84,19 @@
       <DependentUpon>DataPreprocessingView.cs</DependentUpon>
     </Compile>
+    <Compile Include="Implementations\DataGridContent.cs" />
     <Compile Include="Implementations\PreprocessingContext.cs" />
     <Compile Include="Implementations\PreprocessingData.cs" />
     <Compile Include="Implementations\PreprocessingDataManipulation.cs" />
+    <Compile Include="Implementations\SearchLogic.cs" />
     <Compile Include="Implementations\StatisticInfo.cs" />
+    <Compile Include="DataGridContentView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="DataGridContentView.Designer.cs">
+      <DependentUpon>DataGridContentView.cs</DependentUpon>
+    </Compile>
+    <Compile Include="Interfaces\IDataGridContent.cs" />
     <Compile Include="Interfaces\IPreprocessingContext.cs" />
+    <Compile Include="Interfaces\ISearchLogic.cs" />
     <Compile Include="Interfaces\IStatisticInfo.cs" />
     <Compile Include="Interfaces\IPreprocessingData.cs" />
@@ -122,4 +132,8 @@
       <Private>False</Private>
     </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Data.Views\3.3\HeuristicLab.Data.Views-3.3.csproj">
+      <Project>{72104a0b-90e7-42f3-9abe-9bbbadd4b943}</Project>
+      <Name>HeuristicLab.Data.Views-3.3</Name>
+    </ProjectReference>
     <ProjectReference Include="..\..\HeuristicLab.Data\3.3\HeuristicLab.Data-3.3.csproj">
       <Project>{bbab9df5-5ef3-4ba8-ade9-b36e82114937}</Project>
@@ -149,5 +163,9 @@
     </ProjectReference>
   </ItemGroup>
-  <ItemGroup />
+  <ItemGroup>
+    <EmbeddedResource Include="DataPreprocessingView.resx">
+      <DependentUpon>DataPreprocessingView.cs</DependentUpon>
+    </EmbeddedResource>
+  </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <PropertyGroup>
Index: /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/DataGridContent.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/DataGridContent.cs	(revision 10236)
+++ /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/DataGridContent.cs	(revision 10236)
@@ -0,0 +1,152 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Data;
+
+namespace HeuristicLab.DataPreprocessing {
+  public class DataGridContent : IDataGridContent {
+    private readonly IPreprocessingData preprocessingData;
+   
+    public DataGridContent(IPreprocessingData thePreprocessingData) {
+      preprocessingData = thePreprocessingData;
+    }
+
+    #region IStringConvertibleMatrix Members
+
+    public int Rows {
+      get {
+        return preprocessingData.Rows;
+      }
+      set {
+        throw new NotImplementedException();
+      }
+    }
+
+    public int Columns {
+      get {
+        return preprocessingData.Columns;
+      }
+      set {
+        throw new NotImplementedException();
+      }
+    }
+
+    public IEnumerable<string> ColumnNames {
+      get {
+        return preprocessingData.VariableNames;
+      }
+      set {
+        throw new NotImplementedException();
+      }
+    }
+
+    public IEnumerable<string> RowNames {
+      get {
+        return Enumerable.Range(1, Rows).Select(n => n.ToString());
+      }
+      set {
+        throw new NotImplementedException();
+      }
+    }
+
+    public bool SortableView {
+      get {
+        return true;
+      }
+      set {
+        throw new NotImplementedException();
+      }
+    }
+
+    public bool ReadOnly {
+      get { return false; }
+    }
+
+    public bool Validate(string value, out string errorMessage) {
+      errorMessage = string.Empty;
+      return true;
+    }
+
+    public bool Validate(string value, out string errorMessage, int columnIndex) {
+      if (columnIndex < 0 || columnIndex > preprocessingData.VariableNames.Count()) {
+        throw new ArgumentOutOfRangeException("column index is out of range");
+      }
+      bool valid = false;
+      string variableName = preprocessingData.VariableNames[columnIndex];
+      if (preprocessingData.IsType<double>(variableName)) {
+        double val;
+        valid = double.TryParse(value, out val);
+        errorMessage = string.Empty;
+        if (!valid) {
+          errorMessage = "Invalid Value (Valid Value Format: \"" + FormatPatterns.GetDoubleFormatPattern() + "\")";
+        }
+      } else if (preprocessingData.IsType<string>(variableName)) {
+        valid = value != null;
+        errorMessage = string.Empty;
+        if (!valid) {
+          errorMessage = "Invalid Value (string must not be null)";
+        }
+      } else if (preprocessingData.IsType<DateTime>(variableName)) {
+        DateTime date;
+        valid = DateTime.TryParse(value, out date);
+        errorMessage = string.Empty;
+        if (!valid) {
+          errorMessage = "Invalid Value (Valid Value Format: \"" + CultureInfo.CurrentCulture.DateTimeFormat + "\"";
+        }
+      } else {
+        throw new ArgumentException("column with variableName: " + variableName + " contains a non supported type.");
+      }
+
+      return valid;
+    }
+
+    public string GetValue(int rowIndex, int columnIndex) {
+      return preprocessingData.GetCellAsString(preprocessingData.VariableNames[columnIndex], rowIndex);
+    }
+
+    public bool SetValue(string value, int rowIndex, int columnIndex) {
+      string variableName = preprocessingData.VariableNames[columnIndex];
+      bool valid = false;
+      if (preprocessingData.IsType<double>(variableName)) {
+        double val;
+        valid = double.TryParse(value, out val);
+        if (valid) {
+          preprocessingData.SetCell<double>(variableName, rowIndex, val);
+        }
+      } else if (preprocessingData.IsType<string>(variableName)) {
+        valid = value != null;
+        if (valid) {
+          preprocessingData.SetCell<string>(variableName, rowIndex, value);
+        }
+      } else if (preprocessingData.IsType<DateTime>(variableName)) {
+        DateTime date;
+        valid = DateTime.TryParse(value, out date);
+        if (valid) {
+          preprocessingData.SetCell<DateTime>(variableName, rowIndex, date);
+        }
+      } else {
+        throw new ArgumentException("column with variableName: " + variableName + " contains a non supported type.");
+      }
+
+      return valid;
+    }
+
+    public event EventHandler ColumnsChanged;
+
+    public event EventHandler RowsChanged;
+
+    public event EventHandler ColumnNamesChanged;
+
+    public event EventHandler RowNamesChanged;
+
+    public event EventHandler SortableViewChanged;
+
+    public event EventHandler<Common.EventArgs<int, int>> ItemChanged;
+
+    public event EventHandler Reset;
+
+    #endregion
+  }
+}
Index: /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/PreprocessingData.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/PreprocessingData.cs	(revision 10235)
+++ /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/PreprocessingData.cs	(revision 10236)
@@ -102,4 +102,8 @@
     }
 
+    public string GetCellAsString(string variableName, int row) {
+      return variableValues[variableName][row].ToString();
+    }
+
     public IEnumerable<T> GetValues<T>(string variableName) {
       // TODO: test if cast is valid
@@ -145,5 +149,5 @@
     }
 
-    public IEnumerable<string> VariableNames {
+    public IList<string> VariableNames {
       get { return variableNames; }
     }
Index: /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/PreprocessingDataManipulation.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/PreprocessingDataManipulation.cs	(revision 10235)
+++ /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/PreprocessingDataManipulation.cs	(revision 10236)
@@ -14,5 +14,6 @@
         public PreprocessingDataManipulation(IPreprocessingData _prepocessingData) {
             preprocessingData = _prepocessingData;
-            statisticInfo = new StatisticInfo(preprocessingData);
+          //todo 
+            statisticInfo = new StatisticInfo(preprocessingData, new SearchLogic(preprocessingData));
         }
 
Index: /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/SearchLogic.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/SearchLogic.cs	(revision 10236)
+++ /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/SearchLogic.cs	(revision 10236)
@@ -0,0 +1,47 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace HeuristicLab.DataPreprocessing {
+  class SearchLogic : ISearchLogic {
+    private readonly IPreprocessingData preprocessingData;
+
+    public SearchLogic(IPreprocessingData thePreprocessingData) {
+      preprocessingData = thePreprocessingData;
+    }
+
+    public IDictionary<string, IEnumerable<int>> GetMissingValueIndices() {
+      var dic = new Dictionary<string, IEnumerable<int>>();
+      foreach (string variableName in preprocessingData.VariableNames) {
+        dic.Add(variableName, GetMissingValueIndices(variableName));
+      }
+      return dic;
+    }
+
+    public bool IsMissingValue(string variableName, int rowIndex) {
+      if (preprocessingData.IsType<double>(variableName)) {
+        return double.IsNaN(preprocessingData.GetCell<double>(variableName, rowIndex));
+      } else if (preprocessingData.IsType<string>(variableName)) {
+        return string.IsNullOrEmpty(preprocessingData.GetCell<string>(variableName, rowIndex));
+      } else if (preprocessingData.IsType<DateTime>(variableName)) {
+        return preprocessingData.GetCell<DateTime>(variableName, rowIndex).Equals(DateTime.MinValue);
+      } else {
+        throw new ArgumentException("cell in column with variableName: " + variableName + " and row index " + rowIndex + " contains a non supported type.");
+      }
+    }
+
+    public IEnumerable<int> GetMissingValueIndices(string variableName) {
+      if (preprocessingData.IsType<double>(variableName)) {
+        return preprocessingData.GetValues<double>(variableName).Select((s, i) => new { i, s }).Where(t => double.IsNaN(t.s)).Select(t => t.i);
+      } else if (preprocessingData.IsType<string>(variableName)) {
+        return preprocessingData.GetValues<string>(variableName).Select((s, i) => new { i, s }).Where(t => string.IsNullOrEmpty(t.s)).Select(t => t.i);
+      } else if (preprocessingData.IsType<DateTime>(variableName)) {
+        return preprocessingData.GetValues<DateTime>(variableName).Select((s, i) => new { i, s }).Where(t => t.s.Equals(DateTime.MinValue)).Select(t => t.i);
+      } else {
+        throw new ArgumentException("column with variableName: " + variableName + " contains a non supported type.");
+      }
+    }
+
+  }
+}
Index: /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/StatisticInfo.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/StatisticInfo.cs	(revision 10235)
+++ /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/StatisticInfo.cs	(revision 10236)
@@ -7,8 +7,10 @@
   public class StatisticInfo : IStatisticInfo {
 
-    private IPreprocessingData preprocessingData;
+    private readonly IPreprocessingData preprocessingData;
+    private readonly ISearchLogic searchLogic;
 
-    public StatisticInfo(IPreprocessingData thePreprocessingData) {
+    public StatisticInfo(IPreprocessingData thePreprocessingData, ISearchLogic theSearchLogic) {
       preprocessingData = thePreprocessingData;
+      searchLogic = theSearchLogic;
     }
 
@@ -44,5 +46,5 @@
 
     public int GetMissingValueCount(string variableName) {
-      return preprocessingData.GetMissingValueIndices(variableName).Count();
+      return searchLogic.GetMissingValueIndices(variableName).Count();
     }
 
@@ -103,5 +105,5 @@
       int count = 0;
       foreach (var variableName in preprocessingData.VariableNames) {
-        if (preprocessingData.IsMissingValue(variableName, rowIndex)) {
+        if (searchLogic.IsMissingValue(variableName, rowIndex)) {
           ++count;
         }
Index: /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Interfaces/IDataGridContent.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Interfaces/IDataGridContent.cs	(revision 10236)
+++ /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Interfaces/IDataGridContent.cs	(revision 10236)
@@ -0,0 +1,11 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Data;
+
+namespace HeuristicLab.DataPreprocessing {
+  public interface IDataGridContent : IStringConvertibleMatrix {
+    bool Validate(string value, out string errorMessage, int columnIndex);
+  }
+}
Index: /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Interfaces/IPreprocessingData.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Interfaces/IPreprocessingData.cs	(revision 10235)
+++ /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Interfaces/IPreprocessingData.cs	(revision 10236)
@@ -30,4 +30,5 @@
     T GetCell<T>(string variableName, int row);
     void SetCell<T>(string variableName, int row, T value);
+    string GetCellAsString(string variableName, int row);
 
     IEnumerable<T> GetValues<T>(string variableName);
@@ -43,5 +44,5 @@
     IntRange TestPartition { get; }
 
-    IEnumerable<string> VariableNames { get; }
+    IList<string> VariableNames { get; }
     bool IsType<T>(string variableName);
 
@@ -49,19 +50,4 @@
     int Rows { get; }
 
-    /// <summary>
-    /// Return the indices of the missing values where the key 
-    /// correspdonds to the variable name and the values to the row indices
-    /// </summary>
-    /// <returns></returns>
-    IDictionary<string, IEnumerable<int>> GetMissingValueIndices();
-
-    /// <summary>
-    /// Return the row indices of the cells which contain a missing value
-    /// </summary>
-    /// <returns></returns>
-    IEnumerable<int> GetMissingValueIndices(string variableName);
-
-    bool IsMissingValue(string variableName, int rowIndex);
-
     Dataset ExportToDataset();
   }
Index: /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Interfaces/ISearchLogic.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Interfaces/ISearchLogic.cs	(revision 10236)
+++ /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Interfaces/ISearchLogic.cs	(revision 10236)
@@ -0,0 +1,23 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace HeuristicLab.DataPreprocessing {
+  public interface ISearchLogic {
+    /// <summary>
+    /// Return the indices of the missing values where the key 
+    /// correspdonds to the variable name and the values to the row indices
+    /// </summary>
+    /// <returns></returns>
+    IDictionary<string, IEnumerable<int>> GetMissingValueIndices();
+
+    /// <summary>
+    /// Return the row indices of the cells which contain a missing value
+    /// </summary>
+    /// <returns></returns>
+    IEnumerable<int> GetMissingValueIndices(string variableName);
+
+    bool IsMissingValue(string variableName, int rowIndex);
+  }
+}
Index: /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Views/3.4/ProblemDataView.Designer.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Views/3.4/ProblemDataView.Designer.cs	(revision 10235)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Views/3.4/ProblemDataView.Designer.cs	(revision 10236)
@@ -47,4 +47,5 @@
       this.FeatureCorrelationButton = new System.Windows.Forms.Button();
       this.DataPreprocessingButton = new System.Windows.Forms.Button();
+      this.button1 = new System.Windows.Forms.Button();
       ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
       this.SuspendLayout();
@@ -82,8 +83,19 @@
       this.DataPreprocessingButton.Click += new System.EventHandler(this.DataPreprocessingButton_Click);
       // 
+      // button1
+      // 
+      this.button1.Location = new System.Drawing.Point(438, 45);
+      this.button1.Name = "button1";
+      this.button1.Size = new System.Drawing.Size(49, 24);
+      this.button1.TabIndex = 6;
+      this.button1.Text = "Data Preprocessing";
+      this.button1.UseVisualStyleBackColor = true;
+      this.button1.Click += new System.EventHandler(this.button1_Click);
+      // 
       // ProblemDataView
       // 
       this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
       this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.Controls.Add(this.button1);
       this.Controls.Add(this.DataPreprocessingButton);
       this.Controls.Add(this.FeatureCorrelationButton);
@@ -95,4 +107,5 @@
       this.Controls.SetChildIndex(this.FeatureCorrelationButton, 0);
       this.Controls.SetChildIndex(this.DataPreprocessingButton, 0);
+      this.Controls.SetChildIndex(this.button1, 0);
       ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
       this.ResumeLayout(false);
@@ -105,4 +118,5 @@
     protected System.Windows.Forms.Button FeatureCorrelationButton;
     protected System.Windows.Forms.Button DataPreprocessingButton;
+    protected System.Windows.Forms.Button button1;
 
   }
Index: /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Views/3.4/ProblemDataView.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Views/3.4/ProblemDataView.cs	(revision 10235)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Views/3.4/ProblemDataView.cs	(revision 10236)
@@ -123,4 +123,9 @@
       return itemView.Content;
     }
+
+    private void button1_Click(object sender, EventArgs e) {
+      Type viewType = MainFormManager.GetViewTypes(typeof(IDataGridContent), true).FirstOrDefault(t => typeof(DataGridContentView).IsAssignableFrom(t));
+      MainFormManager.MainForm.ShowContent(new DataGridContent(new PreprocessingData(Content)), viewType);
+    }
   }
 }
Index: /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Views/3.4/ProblemDataView.resx
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Views/3.4/ProblemDataView.resx	(revision 10235)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Views/3.4/ProblemDataView.resx	(revision 10236)
@@ -121,7 +121,4 @@
     <value>17, 17</value>
   </metadata>
-  <metadata name="errorProvider.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>17, 17</value>
-  </metadata>
   <metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     <value>140, 17</value>
