Index: branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/DataGridContentView.cs
===================================================================
--- branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/DataGridContentView.cs	(revision 10803)
+++ branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/DataGridContentView.cs	(revision 10804)
@@ -82,4 +82,9 @@
       _highlightedCellsBackground = new Dictionary<int, IList<int>>();
       currentCell = null;
+      DataGridView.SelectionChanged += DataGridView_SelectionChanged;
+    }
+
+    void DataGridView_SelectionChanged(object sender, EventArgs e) {
+      Content.DataGridLogic.SetSelection(GetSelectedCells());
     }
 
Index: branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/PreprocessingChartView.cs
===================================================================
--- branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/PreprocessingChartView.cs	(revision 10803)
+++ branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/PreprocessingChartView.cs	(revision 10804)
@@ -22,5 +22,4 @@
 using System;
 using System.Collections.Generic;
-using System.Drawing;
 using System.Windows.Forms;
 using HeuristicLab.Analysis;
@@ -64,5 +63,5 @@
         if (VariableIsDisplayed(variableName)) {
           dataTable.Rows.Remove(variableName);
-          dataTablePerVariable.Remove(dataTablePerVariable.Find( x => (x.Name == variableName)));
+          dataTablePerVariable.Remove(dataTablePerVariable.Find(x => (x.Name == variableName)));
         } else {
           DataRow row = GetDataRow(variableName);
@@ -91,5 +90,5 @@
       base.RegisterContentEvents();
       Content.ChartLogic.Changed += PreprocessingData_Changed;
-      
+
     }
 
@@ -112,9 +111,9 @@
       dataTable = new PreprocessingDataTable(chartTitle);
       dataTable.Rows.AddRange(dataRows);
-      
+
 
       // init data table per variable
       dataTablePerVariable = new List<PreprocessingDataTable>();
-      foreach(var checkedItem in variableItemList.CheckedItems)  {
+      foreach (var checkedItem in variableItemList.CheckedItems) {
         string variableName = variableItemList[checkedItem.Index].Value;
         PreprocessingDataTable d = new PreprocessingDataTable(variableName);
@@ -123,8 +122,8 @@
         //rowSelect.Name = variableName + "(Selected)";
         //rowSelect.VisualProperties.Color = Color.Green;
-        
+
         d.Rows.Add(row);
         //d.SelectedRows.Add(rowSelect);
-        
+
         dataTablePerVariable.Add(d);
 
@@ -144,7 +143,7 @@
       if (Content != null) {
         logic = Content.ChartLogic;
-        InitData();       
+        InitData();
         variableItemList.CheckedItemsChanged += CheckedItemsChanged;
-        GenerateChart();                
+        GenerateChart();
       }
     }
@@ -167,5 +166,5 @@
         case DataPreprocessingChangedEventType.Any:
           InitData();
-          GenerateChart();          
+          GenerateChart();
           break;
       }
@@ -217,5 +216,5 @@
     protected void GenerateChart() {
 
-      ClearTableLayout();  
+      ClearTableLayout();
 
       if (allInOneMode) {
@@ -234,5 +233,5 @@
       tableLayoutPanel.AutoScroll = false;
       tableLayoutPanel.AutoScroll = true;
-    }   
+    }
 
     private void GenerateSingleChartLayout() {
@@ -247,5 +246,5 @@
     private void GenerateMultiChartLayout() {
       int checkedItemsCnt = 0;
-      foreach(var item in variableItemList.CheckedItems)
+      foreach (var item in variableItemList.CheckedItems)
         checkedItemsCnt++;
 
@@ -262,6 +261,6 @@
 
       if (columns == 3)
-        rows = (checkedItemsCnt+2) / columns;
-      else if(columns == 2)
+        rows = (checkedItemsCnt + 2) / columns;
+      else if (columns == 2)
         rows = (checkedItemsCnt + 1) / columns;
       else
@@ -274,6 +273,6 @@
       List<PreprocessingDataTable>.Enumerator enumerator = dataTablePerVariable.GetEnumerator();
       for (int x = 0; x < columns; x++) {
-        
-        if(rows <= 3)
+
+        if (rows <= 3)
           tableLayoutPanel.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100 / columns));
         else
@@ -298,6 +297,5 @@
             p.Dock = DockStyle.Fill;
             tableLayoutPanel.Controls.Add(p, y, x);
-          }
-          else {
+          } else {
             dataView.Content = d;
             dataView.Dock = DockStyle.Fill;
Index: branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/PreprocessingDataTableView.cs
===================================================================
--- branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/PreprocessingDataTableView.cs	(revision 10803)
+++ branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/PreprocessingDataTableView.cs	(revision 10804)
@@ -20,7 +20,4 @@
 #endregion
 
-using HeuristicLab.Collections;
-using HeuristicLab.Core.Views;
-using HeuristicLab.MainForm;
 using System;
 using System.Collections.Generic;
@@ -29,5 +26,8 @@
 using System.Windows.Forms;
 using System.Windows.Forms.DataVisualization.Charting;
+using HeuristicLab.Collections;
+using HeuristicLab.Core.Views;
 using HeuristicLab.DataPreprocessing.Implementations;
+using HeuristicLab.MainForm;
 
 namespace HeuristicLab.Analysis.Views {
@@ -172,5 +172,5 @@
       else series.Color = Color.Empty;
       series.IsVisibleInLegend = row.VisualProperties.IsVisibleInLegend;
-     
+
       switch (row.VisualProperties.ChartType) {
         case DataRowVisualProperties.DataRowChartType.Line:
@@ -535,11 +535,10 @@
 
     // get minimum ignores nan values
-    private double GetMinimum(IEnumerable<double> values)
-    {
+    private double GetMinimum(IEnumerable<double> values) {
       double min = Double.MaxValue;
 
       foreach (double value in values) {
         if (!Double.IsNaN(value) && value < min)
-          min = value;      
+          min = value;
       }
       return min;
Index: branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/DataGridLogic.cs
===================================================================
--- branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/DataGridLogic.cs	(revision 10803)
+++ branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/DataGridLogic.cs	(revision 10804)
@@ -143,4 +143,23 @@
       return columnIndices.All(x => preprocessingData.IsType<string>(x));
     }
+
+
+
+    public void SetSelection(IDictionary<int, IList<int>> selection) {
+      preprocessingData.SetSelection(selection);
+    }
+
+    public IDictionary<int, IList<int>> GetSelection() {
+      return preprocessingData.GetSelection();
+    }
+    public void ClearSelection() {
+      preprocessingData.ClearSelection();
+    }
+
+    public event EventHandler SelectionChanged {
+      add { preprocessingData.SelectionChanged += value; }
+      remove { preprocessingData.SelectionChanged -= value; }
+    }
+
   }
 }
Index: branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/FilteredPreprocessingData.cs
===================================================================
--- branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/FilteredPreprocessingData.cs	(revision 10803)
+++ branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/FilteredPreprocessingData.cs	(revision 10804)
@@ -4,12 +4,10 @@
 using HeuristicLab.Core;
 using HeuristicLab.Data;
+using HeuristicLab.DataPreprocessing.Interfaces;
 using HeuristicLab.Problems.DataAnalysis;
 using HeuristicLab.Problems.DataAnalysis.Transformations;
-using HeuristicLab.DataPreprocessing.Interfaces;
 
-namespace HeuristicLab.DataPreprocessing.Implementations
-{
-  public class FilteredPreprocessingData : NamedItem, IFilteredPreprocessingData
-  {
+namespace HeuristicLab.DataPreprocessing.Implementations {
+  public class FilteredPreprocessingData : NamedItem, IFilteredPreprocessingData {
     protected ITransactionalPreprocessingData originalData;
     protected ITransactionalPreprocessingData filteredData;
@@ -17,186 +15,175 @@
     protected FilteredPreprocessingData(FilteredPreprocessingData original, Cloner cloner)
       : base(original, cloner) {
-        originalData = (ITransactionalPreprocessingData)original.originalData;
-        filteredData = (ITransactionalPreprocessingData)original.filteredData;
+      originalData = (ITransactionalPreprocessingData)original.originalData;
+      filteredData = (ITransactionalPreprocessingData)original.filteredData;
     }
 
     public FilteredPreprocessingData(ITransactionalPreprocessingData preporcessingData)
       : base() {
-        originalData = preporcessingData;
-        filteredData = null;
+      originalData = preporcessingData;
+      filteredData = null;
     }
 
-     public override IDeepCloneable Clone(Cloner cloner)
-     {
-       return new FilteredPreprocessingData(this, cloner);
-     }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new FilteredPreprocessingData(this, cloner);
+    }
 
-     public T GetCell<T>(int columnIndex, int rowIndex)
-     {
-       return ActiveData.GetCell<T>(columnIndex, rowIndex);
-     }
+    public T GetCell<T>(int columnIndex, int rowIndex) {
+      return ActiveData.GetCell<T>(columnIndex, rowIndex);
+    }
 
-     public void SetCell<T>(int columnIndex, int rowIndex, T value)
-     {
-       ReadOnlyOnFilterData.SetCell<T>(columnIndex, rowIndex, value);
-     }
+    public void SetCell<T>(int columnIndex, int rowIndex, T value) {
+      ReadOnlyOnFilterData.SetCell<T>(columnIndex, rowIndex, value);
+    }
 
-     public string GetCellAsString(int columnIndex, int rowIndex)
-     {
-       return ActiveData.GetCellAsString(columnIndex, rowIndex);
-     }
+    public string GetCellAsString(int columnIndex, int rowIndex) {
+      return ActiveData.GetCellAsString(columnIndex, rowIndex);
+    }
 
-     public IList<T> GetValues<T>(string variableName)
-     {
-       return ActiveData.GetValues<T>(variableName);
-     }
+    public IList<T> GetValues<T>(string variableName) {
+      return ActiveData.GetValues<T>(variableName);
+    }
 
-     public IList<T> GetValues<T>(int columnIndex)
-     {
-       return ActiveData.GetValues<T>(columnIndex);
-     }
+    public IList<T> GetValues<T>(int columnIndex) {
+      return ActiveData.GetValues<T>(columnIndex);
+    }
 
-     public void SetValues<T>(int columnIndex, IList<T> values)
-     {
-       ReadOnlyOnFilterData.SetValues<T>(columnIndex, values);
-     }
+    public void SetValues<T>(int columnIndex, IList<T> values) {
+      ReadOnlyOnFilterData.SetValues<T>(columnIndex, values);
+    }
 
-     public void InsertRow(int rowIndex)
-     {
-       ReadOnlyOnFilterData.InsertRow(rowIndex);
-     }
+    public void InsertRow(int rowIndex) {
+      ReadOnlyOnFilterData.InsertRow(rowIndex);
+    }
 
-     public void DeleteRow(int rowIndex)
-     {
-       ReadOnlyOnFilterData.DeleteRow(rowIndex);
-     }
+    public void DeleteRow(int rowIndex) {
+      ReadOnlyOnFilterData.DeleteRow(rowIndex);
+    }
 
-     public void InsertColumn<T>(string variableName, int columnIndex)
-     {
-       ReadOnlyOnFilterData.InsertColumn<T>(variableName, columnIndex);
-     }
+    public void InsertColumn<T>(string variableName, int columnIndex) {
+      ReadOnlyOnFilterData.InsertColumn<T>(variableName, columnIndex);
+    }
 
-     public void DeleteColumn(int columnIndex)
-     {
-       ReadOnlyOnFilterData.DeleteColumn(columnIndex);
-     }
+    public void DeleteColumn(int columnIndex) {
+      ReadOnlyOnFilterData.DeleteColumn(columnIndex);
+    }
 
-     public IntRange TrainingPartition
-     {
-       get { return originalData.TrainingPartition; }
-     }
+    public IntRange TrainingPartition {
+      get { return originalData.TrainingPartition; }
+    }
 
-     public IntRange TestPartition
-     {
-       get { return originalData.TestPartition; }
-     }
+    public IntRange TestPartition {
+      get { return originalData.TestPartition; }
+    }
 
-     public IList<ITransformation> Transformations
-     {
-       get { return originalData.Transformations; }
-     }
+    public IList<ITransformation> Transformations {
+      get { return originalData.Transformations; }
+    }
 
-     public IEnumerable<string> VariableNames
-     {
-       get { return ActiveData.VariableNames; }
-     }
+    public IEnumerable<string> VariableNames {
+      get { return ActiveData.VariableNames; }
+    }
 
-     public string GetVariableName(int columnIndex)
-     {
-       return ActiveData.GetVariableName(columnIndex);
-     }
+    public string GetVariableName(int columnIndex) {
+      return ActiveData.GetVariableName(columnIndex);
+    }
 
-     public int GetColumnIndex(string variableName)
-     {
-       return ActiveData.GetColumnIndex(variableName);
-     }
+    public int GetColumnIndex(string variableName) {
+      return ActiveData.GetColumnIndex(variableName);
+    }
 
-     public bool IsType<T>(int columnIndex)
-     {
-       return originalData.IsType<T>(columnIndex);
-     }
+    public bool IsType<T>(int columnIndex) {
+      return originalData.IsType<T>(columnIndex);
+    }
 
-     public int Columns
-     {
-       get { return ActiveData.Columns; }
-     }
+    public int Columns {
+      get { return ActiveData.Columns; }
+    }
 
-     public int Rows
-     {
-       get { return ActiveData.Rows; }
-     }
+    public int Rows {
+      get { return ActiveData.Rows; }
+    }
 
-     public Dataset ExportToDataset()
-     {
-       return originalData.ExportToDataset();
-     }
+    public Dataset ExportToDataset() {
+      return originalData.ExportToDataset();
+    }
 
-     public void SetFilter(bool[] rowFilters) {
+    public void SetFilter(bool[] rowFilters) {
 
-       filteredData = (ITransactionalPreprocessingData)originalData.Clone();
+      filteredData = (ITransactionalPreprocessingData)originalData.Clone();
 
-       for (int row = (rowFilters.Length - 1); row >= 0; --row)
-       {
-         if (rowFilters[row])
-         {
-           filteredData.DeleteRow(row);
-         }
-       }
-     }
+      for (int row = (rowFilters.Length - 1); row >= 0; --row) {
+        if (rowFilters[row]) {
+          filteredData.DeleteRow(row);
+        }
+      }
+    }
 
-     public void PersistFilter() {
-       originalData = (ITransactionalPreprocessingData)filteredData.Clone();
-       ResetFilter();
-     }
+    public void PersistFilter() {
+      originalData = (ITransactionalPreprocessingData)filteredData.Clone();
+      ResetFilter();
+    }
 
-     public void ResetFilter() {
-       filteredData = null;
-     }
+    public void ResetFilter() {
+      filteredData = null;
+    }
 
-     public ITransactionalPreprocessingData ActiveData
-     {
-       get { return IsFiltered ? filteredData : originalData; }
-     }
+    public ITransactionalPreprocessingData ActiveData {
+      get { return IsFiltered ? filteredData : originalData; }
+    }
 
-     public ITransactionalPreprocessingData ReadOnlyOnFilterData
-     {
-       get {
-         if (IsFiltered)
-            throw new InvalidOperationException();
-         
-         return originalData;
-       }
-     }
+    public ITransactionalPreprocessingData ReadOnlyOnFilterData {
+      get {
+        if (IsFiltered)
+          throw new InvalidOperationException();
 
-     public bool IsFiltered {
-       get { return filteredData != null; }
-     }
+        return originalData;
+      }
+    }
 
-     public event DataPreprocessingChangedEventHandler Changed;
+    public bool IsFiltered {
+      get { return filteredData != null; }
+    }
 
-     public bool IsUndoAvailable
-     {
-       get { return IsFiltered ? false : originalData.IsUndoAvailable; }
-     }
+    public event DataPreprocessingChangedEventHandler Changed;
 
-     public void Undo()
-     {
-       ReadOnlyOnFilterData.Undo();
-     }
+    public bool IsUndoAvailable {
+      get { return IsFiltered ? false : originalData.IsUndoAvailable; }
+    }
 
-     public void InTransaction(Action action, DataPreprocessingChangedEventType type = DataPreprocessingChangedEventType.Any)
-     {
-       ReadOnlyOnFilterData.InTransaction(action, type);
-     }
+    public void Undo() {
+      ReadOnlyOnFilterData.Undo();
+    }
 
-     public void BeginTransaction(DataPreprocessingChangedEventType type)
-     {
-       ReadOnlyOnFilterData.BeginTransaction(type);
-     }
+    public void InTransaction(Action action, DataPreprocessingChangedEventType type = DataPreprocessingChangedEventType.Any) {
+      ReadOnlyOnFilterData.InTransaction(action, type);
+    }
 
-     public void EndTransaction()
-     {
-       originalData.EndTransaction();
-     }
+    public void BeginTransaction(DataPreprocessingChangedEventType type) {
+      ReadOnlyOnFilterData.BeginTransaction(type);
+    }
+
+    public void EndTransaction() {
+      originalData.EndTransaction();
+    }
+
+    #region IPreprocessingData Members
+
+
+    public void SetSelection(IDictionary<int, IList<int>> selection) {
+      originalData.SetSelection(selection);
+    }
+
+    public IDictionary<int, IList<int>> GetSelection() {
+      return originalData.GetSelection();
+    }
+
+    public void ClearSelection() {
+      originalData.ClearSelection();
+    }
+
+    public event EventHandler SelectionChanged;
+
+    #endregion
   }
 }
Index: branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/PreprocessingData.cs
===================================================================
--- branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/PreprocessingData.cs	(revision 10803)
+++ branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/PreprocessingData.cs	(revision 10804)
@@ -43,4 +43,6 @@
     protected IList<ITransformation> transformations;
 
+    protected IDictionary<int, IList<int>> currentSelection;
+
     protected PreprocessingData(PreprocessingData original, Cloner cloner)
       : base(original, cloner) {
@@ -55,4 +57,5 @@
 
       transformations = new List<ITransformation>();
+      currentSelection = new Dictionary<int, IList<int>>();
 
       variableNames = new List<string>(problemData.Dataset.VariableNames);
@@ -205,4 +208,21 @@
     }
 
+    public void SetSelection(IDictionary<int, IList<int>> selection) {
+      currentSelection = selection;
+      if (SelectionChanged != null) {
+        SelectionChanged(this, new EventArgs());
+      }
+    }
+
+    public IDictionary<int, IList<int>> GetSelection() {
+      return currentSelection;
+    }
+
+    public void ClearSelection() {
+      currentSelection = new Dictionary<int, IList<int>>();
+    }
+
+    public event EventHandler SelectionChanged;
+
     #endregion
   }
Index: branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Interfaces/IDataGridLogic.cs
===================================================================
--- branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Interfaces/IDataGridLogic.cs	(revision 10803)
+++ branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Interfaces/IDataGridLogic.cs	(revision 10804)
@@ -20,4 +20,5 @@
 #endregion
 
+using System;
 using System.Collections.Generic;
 
@@ -38,4 +39,10 @@
 
     void DeleteRow(List<int> rows);
+
+    void SetSelection(IDictionary<int, IList<int>> selection);
+    IDictionary<int, IList<int>> GetSelection();
+    void ClearSelection();
+
+    event EventHandler SelectionChanged;
   }
 }
Index: branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Interfaces/IPreprocessingData.cs
===================================================================
--- branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Interfaces/IPreprocessingData.cs	(revision 10803)
+++ branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Interfaces/IPreprocessingData.cs	(revision 10804)
@@ -64,4 +64,10 @@
 
     Dataset ExportToDataset();
+
+    void SetSelection(IDictionary<int, IList<int>> selection);
+    IDictionary<int, IList<int>> GetSelection();
+    void ClearSelection();
+
+    event EventHandler SelectionChanged;
   }
 }
