Index: /branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.4/DataCompletenessView.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.4/DataCompletenessView.cs	(revision 11001)
+++ /branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.4/DataCompletenessView.cs	(revision 11002)
@@ -46,9 +46,9 @@
     {
       IDictionary<int, IList<int>> missingValueIndices = Content.SearchLogic.GetMissingValueIndices();
-      for (int i = 0; i < Content.DataGridLogic.Columns; i++)
+      for (int i = 0; i < Content.SearchLogic.Columns; i++)
       {
         //append column
         List<bool> column = new List<bool>();
-        for (int j=0; j < Content.DataGridLogic.Rows; j++) {
+        for (int j = 0; j < Content.SearchLogic.Rows; j++) {
           column.Add(missingValueIndices[i].Contains(j));
         }
@@ -74,5 +74,5 @@
       //custom x axis label
       double from = 0.5;
-      foreach (String columnName in Content.DataGridLogic.ColumnNames)
+      foreach (String columnName in Content.SearchLogic.VariableNames)
       {
         double to = from + 1;
Index: /branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.4/DataGridContentView.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.4/DataGridContentView.cs	(revision 11001)
+++ /branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.4/DataGridContentView.cs	(revision 11002)
@@ -140,5 +140,5 @@
     protected override void dataGridView_SelectionChanged(object sender, EventArgs e) {
       base.dataGridView_SelectionChanged(sender, e);
-      Content.DataGridLogic.SetSelection(GetSelectedCells());
+      Content.Selection = GetSelectedCells();
     }
 
@@ -150,5 +150,5 @@
             errorMessage = "A filter is active, you cannot modify data. Press ESC to exit edit mode.";
           } else {
-            Content.DataGridLogic.Validate(e.FormattedValue.ToString(), out errorMessage, e.ColumnIndex);
+            Content.Validate(e.FormattedValue.ToString(), out errorMessage, e.ColumnIndex);
           }
 
@@ -329,5 +329,5 @@
       ResumeRepaint(true);
       isSearching = false;
-      Content.DataGridLogic.SetSelection(selectedCells);
+      Content.Selection = selectedCells;
       //update statistic in base
       base.dataGridView_SelectionChanged(sender, e);
@@ -489,10 +489,10 @@
             medianToolStripMenuItem_Selection.Enabled =
             randomToolStripMenuItem_Column.Enabled =
-            randomToolStripMenuItem_Selection.Enabled = !Content.DataGridLogic.AreAllStringColumns(columnIndices);
+            randomToolStripMenuItem_Selection.Enabled = !Content.PreProcessingData.AreAllStringColumns(columnIndices);
 
           smoothingToolStripMenuItem_Column.Enabled =
             interpolationToolStripMenuItem_Column.Enabled = !dataGridView.SelectedCells.Contains(dataGridView[e.ColumnIndex, 0])
             && !dataGridView.SelectedCells.Contains(dataGridView[e.ColumnIndex, Content.Rows - 1])
-            && !Content.DataGridLogic.AreAllStringColumns(columnIndices);
+            && !Content.PreProcessingData.AreAllStringColumns(columnIndices);
 
           replaceValueOverColumnToolStripMenuItem.Visible = true;
@@ -544,5 +544,5 @@
         }
         triggersOwnEvent(() => {
-          Content.DataGridLogic.DeleteRow(rows);
+          Content.DeleteRow(rows);
           OnContentChanged();
         });
Index: /branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.4/DataPreprocessingView.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.4/DataPreprocessingView.cs	(revision 11001)
+++ /branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.4/DataPreprocessingView.cs	(revision 11002)
@@ -47,14 +47,10 @@
         var data = Content.Data;
         var searchLogic = new SearchLogic(data);
-        var dataGridLogic = new DataGridLogic(data);
         var statisticsLogic = new StatisticsLogic(data, searchLogic);
-        var manipulationLogic = new ManipulationLogic(data, searchLogic, statisticsLogic, dataGridLogic);
-        //var correlationMatrixLogic = new ChartLogic(data);
+        var manipulationLogic = new ManipulationLogic(data, searchLogic, statisticsLogic);
         var filterLogic = new FilterLogic(data);
 
-        //var dataCompletenessLogic = new ChartLogic(data);
-
         var viewShortcuts = new ItemList<IViewShortcut> {
-          new DataGridContent(dataGridLogic, manipulationLogic, filterLogic),
+          new DataGridContent(data, manipulationLogic, filterLogic),
           new StatisticsContent(statisticsLogic),
 
@@ -63,8 +59,8 @@
           new ScatterPlotContent(data),
           new CorrelationMatrixContent(Content),
-          new DataCompletenessChartContent(dataGridLogic, searchLogic),
+          new DataCompletenessChartContent(searchLogic),
           
           new FilterContent(filterLogic),
-          new ManipulationContent(manipulationLogic, searchLogic, dataGridLogic, filterLogic),
+          new ManipulationContent(manipulationLogic, searchLogic, filterLogic),
           new TransformationContent(data, filterLogic)
         };
Index: /branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.4/FilterView.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.4/FilterView.cs	(revision 11001)
+++ /branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.4/FilterView.cs	(revision 11002)
@@ -113,5 +113,5 @@
       {
         UpdateFilterInfo();
-        Content.isAndCombination = rBtnAnd.Checked;
+        Content.IsAndCombination = rBtnAnd.Checked;
       }
     }
Index: /branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.4/ManipulationView.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.4/ManipulationView.cs	(revision 11001)
+++ /branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.4/ManipulationView.cs	(revision 11002)
@@ -68,5 +68,5 @@
       if (Content != null) {
         cmbVariableNames.Items.Clear();
-        foreach (var name in Content.DataGridLogic.ColumnNames) {
+        foreach (var name in Content.ManipulationLogic.VariableNames) {
           cmbVariableNames.Items.Add(name);
         }
@@ -204,5 +204,5 @@
         if (string.IsNullOrEmpty(replaceValue)) {
           lblPreviewReplaceMissingValues.Text = "Preview not possible yet - please input the text which will be used as replacement.";
-        } else if (!Content.DataGridLogic.Validate(txtReplaceValue.Text, out errorMessage, columnIndex)) {
+        } else if (!Content.ManipulationLogic.PreProcessingData.Validate(txtReplaceValue.Text, out errorMessage, columnIndex)) {
           lblPreviewReplaceMissingValues.Text = "Preview not possible yet - " + errorMessage;
         } else {
Index: /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.4/HeuristicLab.DataPreprocessing-3.4.csproj
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.4/HeuristicLab.DataPreprocessing-3.4.csproj	(revision 11001)
+++ /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.4/HeuristicLab.DataPreprocessing-3.4.csproj	(revision 11002)
@@ -78,5 +78,4 @@
     <Compile Include="Implementations\PreprocessingChartContent.cs" />
     <Compile Include="Implementations\PreprocessingData.cs" />
-    <Compile Include="Implementations\DataGridLogic.cs" />
     <Compile Include="Implementations\PreprocessingDataTable.cs" />
     <Compile Include="Interfaces\IViewChartShortcut.cs" />
Index: /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.4/Implementations/CorrelationMatrixContent.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.4/Implementations/CorrelationMatrixContent.cs	(revision 11001)
+++ /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.4/Implementations/CorrelationMatrixContent.cs	(revision 11002)
@@ -50,4 +50,5 @@
     public CorrelationMatrixContent(CorrelationMatrixContent original, Cloner cloner)
       : base(original, cloner) {
+        Context = original.Context;
     }
 
Index: /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.4/Implementations/DataCompletenessChartContent.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.4/Implementations/DataCompletenessChartContent.cs	(revision 11001)
+++ /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.4/Implementations/DataCompletenessChartContent.cs	(revision 11002)
@@ -5,22 +5,25 @@
 namespace HeuristicLab.DataPreprocessing {
   [Item("DataCompletenessChart", "Represents a datacompleteness chart.")]
-  public class DataCompletenessChartContent : Item, IViewChartShortcut {
 
+  public class DataCompletenessChartContent : Item, IViewChartShortcut
+  {
     public static new Image StaticItemImage {
       get { return HeuristicLab.Common.Resources.VSImageLibrary.EditBrightnessContrast; }
     }
 
+    private readonly SearchLogic searchLogic;
+
     public IDataGridLogic DataGridLogic { get; private set; }
     public ISearchLogic SearchLogic { get; private set; }
 
-    public DataCompletenessChartContent(DataGridLogic dataGridLogic, SearchLogic searchLogic) {
-      DataGridLogic = dataGridLogic;
-      SearchLogic = searchLogic;
+    public DataCompletenessChartContent(SearchLogic searchLogic)
+    {
+      this.searchLogic = searchLogic;
     }
-
+    
     public DataCompletenessChartContent(DataCompletenessChartContent content, Cloner cloner)
-      : base(content, cloner) {
-      DataGridLogic = content.DataGridLogic;
-      SearchLogic = content.SearchLogic;
+      : base(content, cloner)
+    {
+      this.searchLogic = content.searchLogic;
     }
 
Index: /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.4/Implementations/DataGridContent.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.4/Implementations/DataGridContent.cs	(revision 11001)
+++ /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.4/Implementations/DataGridContent.cs	(revision 11002)
@@ -23,6 +23,9 @@
 using System.Collections.Generic;
 using System.Drawing;
+using System.Globalization;
+using System.Linq;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
+using HeuristicLab.Data;
 
 namespace HeuristicLab.DataPreprocessing {
@@ -31,4 +34,6 @@
   public class DataGridContent : Item, IViewShortcut, IDataGridContent {
 
+    public ITransactionalPreprocessingData PreProcessingData { get; private set; }
+
     public static new Image StaticItemImage {
       get { return HeuristicLab.Common.Resources.VSImageLibrary.Table; }
@@ -36,10 +41,11 @@
 
     public IManipulationLogic ManipulationLogic { get; private set; }
-    public IDataGridLogic DataGridLogic { get; private set; }
     public IFilterLogic FilterLogic { get; private set; }
+
+    private IEnumerable<string> rowNames;
 
     public int Rows {
       get {
-        return DataGridLogic.Rows;
+        return PreProcessingData.Rows;
       }
       set {
@@ -50,5 +56,5 @@
     public int Columns {
       get {
-        return DataGridLogic.Columns;
+        return PreProcessingData.Columns;
       }
       set {
@@ -59,5 +65,5 @@
     public IEnumerable<string> ColumnNames {
       get {
-        return DataGridLogic.ColumnNames;
+        return PreProcessingData.VariableNames;
       }
       set {
@@ -68,5 +74,5 @@
     public IEnumerable<string> RowNames {
       get {
-        return DataGridLogic.RowNames;
+        return rowNames;
       }
       set {
@@ -88,8 +94,17 @@
     }
 
-    public DataGridContent(IDataGridLogic theDataGridLogic, IManipulationLogic theManipulationLogic, IFilterLogic theFilterLogic) {
-      DataGridLogic = theDataGridLogic;
+
+    private IDictionary<int, IList<int>> selection;
+    public IDictionary<int, IList<int>> Selection {
+      get { return PreProcessingData.Selection; }
+      set { PreProcessingData.Selection = value; }
+    }
+
+
+    public DataGridContent(ITransactionalPreprocessingData preProcessingData, IManipulationLogic theManipulationLogic, IFilterLogic theFilterLogic) {
       ManipulationLogic = theManipulationLogic;
       FilterLogic = theFilterLogic;
+      PreProcessingData = preProcessingData;
+      createRowNames();
     }
 
@@ -102,15 +117,28 @@
     }
 
+    public void DeleteRow(IEnumerable<int> rows) {
+      PreProcessingData.DeleteRowsWithIndices(rows);
+      createRowNames();
+    }
+
+    public bool Validate(string value, out string errorMessage, int columnIndex) {
+      return PreProcessingData.Validate(value, out errorMessage, columnIndex);
+    }
+
     public string GetValue(int rowIndex, int columnIndex) {
-      return DataGridLogic.GetValue(columnIndex, rowIndex);
+      return PreProcessingData.GetCellAsString(columnIndex, rowIndex);
     }
 
     public bool SetValue(string value, int rowIndex, int columnIndex) {
-      return DataGridLogic.SetValue(value, columnIndex, rowIndex);
+      return PreProcessingData.SetValue(value, columnIndex, rowIndex);
+    }
+
+    private void createRowNames() {
+      rowNames = Enumerable.Range(1, Rows).Select(n => n.ToString());
     }
 
     public event DataPreprocessingChangedEventHandler Changed {
-      add { DataGridLogic.Changed += value; }
-      remove { DataGridLogic.Changed -= value; }
+      add { PreProcessingData.Changed += value; }
+      remove { PreProcessingData.Changed -= value; }
     }
 
@@ -126,15 +154,9 @@
 
     public event EventHandler ColumnsChanged;
-
     public event EventHandler RowsChanged;
-
     public event EventHandler ColumnNamesChanged;
-
     public event EventHandler RowNamesChanged;
-
     public event EventHandler SortableViewChanged;
-
     public event EventHandler<EventArgs<int, int>> ItemChanged;
-
     public event EventHandler Reset;
     #endregion
Index: anches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.4/Implementations/DataGridLogic.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.4/Implementations/DataGridLogic.cs	(revision 11001)
+++ 	(revision )
@@ -1,165 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System;
-using System.Collections.Generic;
-using System.Globalization;
-using System.Linq;
-using HeuristicLab.Data;
-
-namespace HeuristicLab.DataPreprocessing {
-  public class DataGridLogic : IDataGridLogic {
-
-    private ITransactionalPreprocessingData PreprocessingData { get; private set; }
-    private IEnumerable<string> rowNames;
-
-    public int Rows {
-      get {
-        return PreprocessingData.Rows;
-      }
-    }
-
-    public int Columns {
-      get {
-        return PreprocessingData.Columns;
-      }
-    }
-
-    public IEnumerable<string> ColumnNames {
-      get {
-        return PreprocessingData.VariableNames;
-      }
-    }
-
-    public IEnumerable<string> RowNames {
-      get {
-        return rowNames;
-      }
-    }
-
-    public DataGridLogic(ITransactionalPreprocessingData preprocessingData) {
-      PreprocessingData = preprocessingData;
-      createRowNames();
-    }
-
-    private void createRowNames() {
-      rowNames = Enumerable.Range(1, Rows).Select(n => n.ToString());
-    }
-
-
-
-    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;
-      errorMessage = string.Empty;
-      if (PreprocessingData.IsType<double>(columnIndex)) {
-        double val;
-        valid = double.TryParse(value, out val);
-        if (!valid) {
-          errorMessage = "Invalid Value (Valid Value Format: \"" + FormatPatterns.GetDoubleFormatPattern() + "\")";
-        }
-      } else if (PreprocessingData.IsType<string>(columnIndex)) {
-        valid = value != null;
-        if (!valid) {
-          errorMessage = "Invalid Value (string must not be null)";
-        }
-      } else if (PreprocessingData.IsType<DateTime>(columnIndex)) {
-        DateTime date;
-        valid = DateTime.TryParse(value, out date);
-        if (!valid) {
-          errorMessage = "Invalid Value (Valid Value Format: \"" + CultureInfo.CurrentCulture.DateTimeFormat + "\"";
-        }
-      } else {
-        throw new ArgumentException("column " + columnIndex + " contains a non supported type.");
-      }
-
-      return valid;
-    }
-
-    public string GetValue(int columnIndex, int rowIndex) {
-      return PreprocessingData.GetCellAsString(columnIndex, rowIndex);
-    }
-
-    public bool SetValue(string value, int columnIndex, int rowIndex) {
-      bool valid = false;
-      if (PreprocessingData.IsType<double>(columnIndex)) {
-        double val;
-        valid = double.TryParse(value, out val);
-        SetValueIfValid(columnIndex, rowIndex, valid, val);
-      } else if (PreprocessingData.IsType<string>(columnIndex)) {
-        valid = value != null;
-        SetValueIfValid(columnIndex, rowIndex, valid, value);
-      } else if (PreprocessingData.IsType<DateTime>(columnIndex)) {
-        DateTime date;
-        valid = DateTime.TryParse(value, out date);
-        SetValueIfValid(columnIndex, rowIndex, valid, date);
-      } else {
-        throw new ArgumentException("column " + columnIndex + " contains a non supported type.");
-      }
-      return valid;
-    }
-
-    private void SetValueIfValid<T>(int columnIndex, int rowIndex, bool valid, T value) {
-      if (valid) {
-        PreprocessingData.SetCell<T>(columnIndex, rowIndex, value);
-      }
-    }
-
-    public void DeleteRow(List<int> rows) {
-      PreprocessingData.InTransaction(() => {
-        foreach (int rowIndex in rows) {
-          PreprocessingData.DeleteRow(rowIndex);
-        }
-      });
-      createRowNames();
-    }
-
-    public event DataPreprocessingChangedEventHandler Changed {
-      add { PreprocessingData.Changed += value; }
-      remove { PreprocessingData.Changed -= value; }
-    }
-
-    public bool AreAllStringColumns(IEnumerable<int> columnIndices) {
-      return columnIndices.All(x => PreprocessingData.IsType<string>(x));
-    }
-
-
-    public void SetSelection(IDictionary<int, IList<int>> selection) {
-      PreprocessingData.Selection = selection;
-    }
-
-    public IDictionary<int, IList<int>> GetSelection() {
-      return PreprocessingData.Selection;
-    }
-    public void ClearSelection() {
-      PreprocessingData.ClearSelection();
-    }
-
-    public event EventHandler SelectionChanged {
-      add { PreprocessingData.SelectionChanged += value; }
-      remove { PreprocessingData.SelectionChanged -= value; }
-    }
-
-  }
-}
Index: /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.4/Implementations/ManipulationContent.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.4/Implementations/ManipulationContent.cs	(revision 11001)
+++ /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.4/Implementations/ManipulationContent.cs	(revision 11002)
@@ -31,10 +31,8 @@
     private IManipulationLogic manipulationLogic;
     private ISearchLogic searchLogic;
-    private IDataGridLogic dataGridLogic;
     private IFilterLogic filterLogic;
 
     public IManipulationLogic ManipulationLogic { get { return manipulationLogic; } }
     public ISearchLogic SearchLogic { get { return searchLogic; } }
-    public IDataGridLogic DataGridLogic { get { return dataGridLogic; } }
     public IFilterLogic FilterLogic { get { return filterLogic; } }
 
@@ -43,8 +41,7 @@
     }
 
-    public ManipulationContent(IManipulationLogic theManipulationLogic, ISearchLogic theSearchLogic, IDataGridLogic theDataGridLogic, IFilterLogic theFitlerLogic) {
+    public ManipulationContent(IManipulationLogic theManipulationLogic, ISearchLogic theSearchLogic, IFilterLogic theFitlerLogic) {
       manipulationLogic = theManipulationLogic;
       searchLogic = theSearchLogic;
-      dataGridLogic = theDataGridLogic;
       filterLogic = theFitlerLogic;
     }
Index: /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.4/Implementations/ManipulationLogic.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.4/Implementations/ManipulationLogic.cs	(revision 11001)
+++ /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.4/Implementations/ManipulationLogic.cs	(revision 11002)
@@ -30,11 +30,17 @@
     private IStatisticsLogic statisticsLogic;
     private ISearchLogic searchLogic;
-    private IDataGridLogic dataGridLogic;
-
-    public ManipulationLogic(ITransactionalPreprocessingData _prepocessingData, ISearchLogic theSearchLogic, IStatisticsLogic theStatisticsLogic, IDataGridLogic theDataGridLogic) {
+
+    public IEnumerable<string> VariableNames {
+      get { return preprocessingData.VariableNames; }
+    }
+
+    public ITransactionalPreprocessingData PreProcessingData {
+      get { return preprocessingData; }
+    }
+
+    public ManipulationLogic(ITransactionalPreprocessingData _prepocessingData, ISearchLogic theSearchLogic, IStatisticsLogic theStatisticsLogic) {
       preprocessingData = _prepocessingData;
       searchLogic = theSearchLogic;
       statisticsLogic = theStatisticsLogic;
-      dataGridLogic = theDataGridLogic;
     }
 
@@ -316,5 +322,5 @@
         foreach (var column in cells) {
           foreach (var rowIdx in column.Value) {
-            dataGridLogic.SetValue(value, column.Key, rowIdx);
+            preprocessingData.SetValue(value, column.Key, rowIdx);
           }
         }
@@ -396,8 +402,5 @@
     }
 
-    public event DataPreprocessingChangedEventHandler Changed {
-      add { dataGridLogic.Changed += value; }
-      remove { dataGridLogic.Changed -= value; }
-    }
+    public event DataPreprocessingChangedEventHandler Changed;
   }
 }
Index: /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.4/Implementations/PreprocessingData.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.4/Implementations/PreprocessingData.cs	(revision 11001)
+++ /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.4/Implementations/PreprocessingData.cs	(revision 11002)
@@ -23,4 +23,5 @@
 using System.Collections;
 using System.Collections.Generic;
+using System.Globalization;
 using System.Linq;
 using HeuristicLab.Common;
@@ -95,4 +96,5 @@
       selection = new Dictionary<int, IList<int>>();
 
+      Dataset dataset = problemData.Dataset;
       variableNames = new List<string>(problemData.Dataset.VariableNames);
 
@@ -100,10 +102,10 @@
       variableValues = new List<IList>();
       foreach (var variableName in problemData.Dataset.VariableNames) {
-        if (problemData.Dataset.IsType<double>(variableName)) {
-          variableValues.Insert(columnIndex, problemData.Dataset.GetDoubleValues(variableName).ToList());
-        } else if (problemData.Dataset.IsType<string>(variableName)) {
-          variableValues.Insert(columnIndex, CreateColumn<string>(problemData.Dataset, columnIndex, x => x));
-        } else if (problemData.Dataset.IsType<DateTime>(variableName)) {
-          variableValues.Insert(columnIndex, CreateColumn<DateTime>(problemData.Dataset, columnIndex, x => DateTime.Parse(x)));
+        if (dataset.IsType<double>(variableName)) {
+          variableValues.Insert(columnIndex, dataset.GetDoubleValues(variableName).ToList());
+        } else if (dataset.IsType<string>(variableName)) {
+          variableValues.Insert(columnIndex, dataset.GetStringValues(variableName).ToList());
+        } else if (dataset.IsType<DateTime>(variableName)) {
+          variableValues.Insert(columnIndex, dataset.GetDateTimeValues(variableName).ToList());
         } else {
           throw new ArgumentException("The datatype of column " + variableName + " must be of type double, string or DateTime");
@@ -180,4 +182,12 @@
     public abstract void SetValues<T>(int columnIndex, IList<T> values);
 
+    public abstract bool SetValue(string value, int columnIndex, int rowIndex);
+
+    public abstract bool Validate(string value, out string errorMessage, int columnIndex);
+
+    public abstract bool AreAllStringColumns(IEnumerable<int> columnIndices);
+
+    public abstract void DeleteRowsWithIndices(IEnumerable<int> rows);
+
     public abstract void InsertRow(int rowIndex);
 
Index: /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.4/Implementations/SearchLogic.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.4/Implementations/SearchLogic.cs	(revision 11001)
+++ /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.4/Implementations/SearchLogic.cs	(revision 11002)
@@ -31,4 +31,16 @@
     private Dictionary<int, IList<int>> MissingValueIndicies { get; set; }
     private Dictionary<int, IList> ValuesWithoutNaN { get; set; }
+
+    public IEnumerable<string> VariableNames {
+      get { return preprocessingData.VariableNames; }
+    }
+
+    public int Columns {
+      get { return preprocessingData.Columns; }
+    }
+
+    public int Rows {
+      get { return preprocessingData.Rows; }
+    }
 
     public SearchLogic(ITransactionalPreprocessingData thePreprocessingData) {
Index: /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.4/Implementations/TransactionalPreprocessingData.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.4/Implementations/TransactionalPreprocessingData.cs	(revision 11001)
+++ /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.4/Implementations/TransactionalPreprocessingData.cs	(revision 11002)
@@ -23,4 +23,6 @@
 using System.Collections;
 using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
@@ -159,4 +161,73 @@
       if (!IsInTransaction)
         OnChanged(DataPreprocessingChangedEventType.ChangeColumn, columnIndex, -1);
+    }
+
+    public override bool SetValue(string value, int columnIndex, int rowIndex) {
+      bool valid = false;
+      if (IsType<double>(columnIndex)) {
+        double val;
+        valid = double.TryParse(value, out val);
+        SetValueIfValid(columnIndex, rowIndex, valid, val);
+      } else if (IsType<string>(columnIndex)) {
+        valid = value != null;
+        SetValueIfValid(columnIndex, rowIndex, valid, value);
+      } else if (IsType<DateTime>(columnIndex)) {
+        DateTime date;
+        valid = DateTime.TryParse(value, out date);
+        SetValueIfValid(columnIndex, rowIndex, valid, date);
+      } else {
+        throw new ArgumentException("column " + columnIndex + " contains a non supported type.");
+      }
+
+      if (!IsInTransaction)
+        OnChanged(DataPreprocessingChangedEventType.ChangeColumn, columnIndex, -1);
+
+      return valid;
+    }
+    
+    public override bool Validate(string value, out string errorMessage, int columnIndex){
+     if (columnIndex < 0 || columnIndex > VariableNames.Count()) {
+        throw new ArgumentOutOfRangeException("column index is out of range");
+      }
+
+      bool valid = false;
+      errorMessage = string.Empty;
+      if (IsType<double>(columnIndex)) {
+        double val;
+        valid = double.TryParse(value, out val);
+        if (!valid) {
+          errorMessage = "Invalid Value (Valid Value Format: \"" + FormatPatterns.GetDoubleFormatPattern() + "\")";
+        }
+      } else if (IsType<string>(columnIndex)) {
+        valid = value != null;
+        if (!valid) {
+          errorMessage = "Invalid Value (string must not be null)";
+        }
+      } else if (IsType<DateTime>(columnIndex)) {
+        DateTime date;
+        valid = DateTime.TryParse(value, out date);
+        if (!valid) {
+          errorMessage = "Invalid Value (Valid Value Format: \"" + CultureInfo.CurrentCulture.DateTimeFormat + "\"";
+        }
+      } else {
+        throw new ArgumentException("column " + columnIndex + " contains a non supported type.");
+      }
+
+      return valid;
+    }
+
+    private void SetValueIfValid<T>(int columnIndex, int rowIndex, bool valid, T value) {
+      if (valid)
+        SetCell<T>(columnIndex, rowIndex, value);
+    }
+
+    public override bool AreAllStringColumns(IEnumerable<int> columnIndices) {
+      return columnIndices.All(x => IsType<string>(x));
+    }
+
+    public override void DeleteRowsWithIndices(IEnumerable<int> rows) {
+      foreach (int rowIndex in rows) {
+        DeleteRow(rowIndex);
+      }
     }
 
Index: /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.4/Interfaces/IDataGridContent.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.4/Interfaces/IDataGridContent.cs	(revision 11001)
+++ /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.4/Interfaces/IDataGridContent.cs	(revision 11002)
@@ -20,11 +20,17 @@
 #endregion
 
+using System.Collections.Generic;
 using HeuristicLab.Data;
 
 namespace HeuristicLab.DataPreprocessing {
   public interface IDataGridContent : IStringConvertibleMatrix {
-    IDataGridLogic DataGridLogic { get; }
+    ITransactionalPreprocessingData PreProcessingData { get; }
     IManipulationLogic ManipulationLogic { get; }
     IFilterLogic FilterLogic { get; }
+
+    IDictionary<int, IList<int>> Selection { get; set; }
+
+    void DeleteRow(IEnumerable<int> rows);
+    bool Validate(string value, out string errorMessage, int columnIndex);
 
     event DataPreprocessingChangedEventHandler Changed;
Index: /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.4/Interfaces/IDataGridLogic.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.4/Interfaces/IDataGridLogic.cs	(revision 11001)
+++ /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.4/Interfaces/IDataGridLogic.cs	(revision 11002)
@@ -40,6 +40,5 @@
     void DeleteRow(List<int> rows);
 
-    void SetSelection(IDictionary<int, IList<int>> selection);
-    IDictionary<int, IList<int>> GetSelection();
+    IDictionary<int, IList<int>> Selection { get; set; }
     void ClearSelection();
 
Index: /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.4/Interfaces/IFilterLogic.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.4/Interfaces/IFilterLogic.cs	(revision 11001)
+++ /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.4/Interfaces/IFilterLogic.cs	(revision 11002)
@@ -23,4 +23,5 @@
 using System.Collections.Generic;
 using HeuristicLab.DataPreprocessing.Filter;
+using HeuristicLab.DataPreprocessing.Interfaces;
 namespace HeuristicLab.DataPreprocessing {
   public interface IFilterLogic {
@@ -34,5 +35,5 @@
     bool[] Preview(IList<IFilter> filters, bool isAndCombination);
     void Apply(IList<IFilter> filters, bool isAndCombination);
-    IPreprocessingData PreprocessingData { get; }
+    IFilteredPreprocessingData PreprocessingData { get; }
     void Reset();
     bool IsFiltered { get; }
Index: /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.4/Interfaces/IManipulationLogic.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.4/Interfaces/IManipulationLogic.cs	(revision 11001)
+++ /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.4/Interfaces/IManipulationLogic.cs	(revision 11002)
@@ -25,4 +25,6 @@
 namespace HeuristicLab.DataPreprocessing {
   public interface IManipulationLogic {
+    IEnumerable<string> VariableNames { get; }
+    ITransactionalPreprocessingData PreProcessingData { get; }
     void ReOrderToIndices(IEnumerable<int> indices);
     void ReOrderToIndices(IList<Tuple<int, int>> indices);
Index: /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.4/Interfaces/IPreprocessingData.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.4/Interfaces/IPreprocessingData.cs	(revision 11001)
+++ /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.4/Interfaces/IPreprocessingData.cs	(revision 11002)
@@ -41,13 +41,17 @@
 
     void SetValues<T>(int columnIndex, IList<T> values);
+    bool SetValue(string value, int columnIndex, int rowIndex);
 
     void InsertRow(int rowIndex);
     void DeleteRow(int rowIndex);
-
+    void DeleteRowsWithIndices(IEnumerable<int> rows);
     void InsertColumn<T>(string variableName, int columnIndex);
 
     void DeleteColumn(int columnIndex);
 
-    IntRange TrainingPartition { get; }
+    bool AreAllStringColumns(IEnumerable<int> columnIndices);
+    bool Validate(string value, out string errorMessage, int columnIndex);
+    
+      IntRange TrainingPartition { get; }
     IntRange TestPartition { get; }
 
Index: /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.4/Interfaces/ISearchLogic.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.4/Interfaces/ISearchLogic.cs	(revision 11001)
+++ /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.4/Interfaces/ISearchLogic.cs	(revision 11002)
@@ -24,4 +24,9 @@
 namespace HeuristicLab.DataPreprocessing {
   public interface ISearchLogic {
+
+    int Rows { get; }
+    int Columns { get; }
+    IEnumerable<string> VariableNames { get; }
+
     /// <summary>
     /// Return the indices of the missing values where the key 
Index: /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis/3.4/Dataset.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis/3.4/Dataset.cs	(revision 11001)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis/3.4/Dataset.cs	(revision 11002)
@@ -170,4 +170,29 @@
         yield return value;
     }
+
+    public IEnumerable<string> GetStringValues(string variableName) {
+      IList list;
+      if (!variableValues.TryGetValue(variableName, out list))
+        throw new ArgumentException("The variable " + variableName + " does not exist in the dataset.");
+      List<string> values = list as List<string>;
+      if (values == null) throw new ArgumentException("The variable " + variableName + " is not a string variable.");
+
+      //mkommend yield return used to enable lazy evaluation
+      foreach (string value in values)
+        yield return value;
+    }
+
+    public IEnumerable<DateTime> GetDateTimeValues(string variableName) {
+      IList list;
+      if (!variableValues.TryGetValue(variableName, out list))
+        throw new ArgumentException("The variable " + variableName + " does not exist in the dataset.");
+      List<string> values = list as List<string>;
+      if (values == null) throw new ArgumentException("The variable " + variableName + " is not a datetime variable.");
+
+      //mkommend yield return used to enable lazy evaluation
+      foreach (string value in values)
+        yield return DateTime.Parse(value);
+    }
+
     public ReadOnlyCollection<double> GetReadOnlyDoubleValues(string variableName) {
       IList list;
