Index: trunk/sources/HeuristicLab.Data.Views/3.3/HeuristicLab.Data.Views-3.3.csproj
===================================================================
--- trunk/sources/HeuristicLab.Data.Views/3.3/HeuristicLab.Data.Views-3.3.csproj	(revision 12602)
+++ trunk/sources/HeuristicLab.Data.Views/3.3/HeuristicLab.Data.Views-3.3.csproj	(revision 12676)
@@ -41,5 +41,5 @@
     <DebugType>full</DebugType>
     <Optimize>false</Optimize>
-    <OutputPath>$(SolutionDir)\bin\</OutputPath>
+    <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath>
     <DefineConstants>DEBUG;TRACE</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
@@ -105,4 +105,36 @@
   </PropertyGroup>
   <ItemGroup>
+    <Reference Include="HeuristicLab.Common-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\..\..\..\..\HL Preprocessing\trunk\sources\bin\HeuristicLab.Common-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Common.Resources-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\..\..\..\..\HL Preprocessing\trunk\sources\bin\HeuristicLab.Common.Resources-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Core-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\..\..\..\..\HL Preprocessing\trunk\sources\bin\HeuristicLab.Core-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Core.Views-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\..\..\..\..\HL Preprocessing\trunk\sources\bin\HeuristicLab.Core.Views-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Data-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\..\..\..\..\HL Preprocessing\trunk\sources\bin\HeuristicLab.Data-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.MainForm-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\..\..\..\..\HL Preprocessing\trunk\sources\bin\HeuristicLab.MainForm-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.MainForm.WindowsForms-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\..\..\..\..\HL Preprocessing\trunk\sources\bin\HeuristicLab.MainForm.WindowsForms-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.PluginInfrastructure-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\..\..\..\..\HL Preprocessing\trunk\sources\bin\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath>
+    </Reference>
     <Reference Include="System" />
     <Reference Include="System.Core">
@@ -230,46 +262,4 @@
     <None Include="HeuristicLab.snk" />
     <None Include="Properties\AssemblyInfo.cs.frame" />
-  </ItemGroup>
-  <ItemGroup>
-    <ProjectReference Include="..\..\HeuristicLab.Common.Resources\3.3\HeuristicLab.Common.Resources-3.3.csproj">
-      <Project>{0e27a536-1c4a-4624-a65e-dc4f4f23e3e1}</Project>
-      <Name>HeuristicLab.Common.Resources-3.3</Name>
-      <Private>False</Private>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.Common\3.3\HeuristicLab.Common-3.3.csproj">
-      <Project>{A9AD58B9-3EF9-4CC1-97E5-8D909039FF5C}</Project>
-      <Name>HeuristicLab.Common-3.3</Name>
-      <Private>False</Private>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.Core.Views\3.3\HeuristicLab.Core.Views-3.3.csproj">
-      <Project>{E226881D-315F-423D-B419-A766FE0D8685}</Project>
-      <Name>HeuristicLab.Core.Views-3.3</Name>
-      <Private>False</Private>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.Core\3.3\HeuristicLab.Core-3.3.csproj">
-      <Project>{C36BD924-A541-4A00-AFA8-41701378DDC5}</Project>
-      <Name>HeuristicLab.Core-3.3</Name>
-      <Private>False</Private>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.Data\3.3\HeuristicLab.Data-3.3.csproj">
-      <Project>{BBAB9DF5-5EF3-4BA8-ADE9-B36E82114937}</Project>
-      <Name>HeuristicLab.Data-3.3</Name>
-      <Private>False</Private>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.MainForm.WindowsForms\3.3\HeuristicLab.MainForm.WindowsForms-3.3.csproj">
-      <Project>{AB687BBE-1BFE-476B-906D-44237135431D}</Project>
-      <Name>HeuristicLab.MainForm.WindowsForms-3.3</Name>
-      <Private>False</Private>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.MainForm\3.3\HeuristicLab.MainForm-3.3.csproj">
-      <Project>{3BD61258-31DA-4B09-89C0-4F71FEF5F05A}</Project>
-      <Name>HeuristicLab.MainForm-3.3</Name>
-      <Private>False</Private>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.PluginInfrastructure\3.3\HeuristicLab.PluginInfrastructure-3.3.csproj">
-      <Project>{94186A6A-5176-4402-AE83-886557B53CCA}</Project>
-      <Name>HeuristicLab.PluginInfrastructure-3.3</Name>
-      <Private>False</Private>
-    </ProjectReference>
   </ItemGroup>
   <ItemGroup>
Index: trunk/sources/HeuristicLab.Data.Views/3.3/StringConvertibleMatrixView.cs
===================================================================
--- trunk/sources/HeuristicLab.Data.Views/3.3/StringConvertibleMatrixView.cs	(revision 12602)
+++ trunk/sources/HeuristicLab.Data.Views/3.3/StringConvertibleMatrixView.cs	(revision 12676)
@@ -109,6 +109,7 @@
         dataGridView.Columns.Clear();
         virtualRowIndices = new int[0];
-      } else
+      } else if (!dataGridView.IsCurrentCellInEditMode) {
         UpdateData();
+      }
     }
 
@@ -295,5 +296,5 @@
     }
 
-    private void dataGridView_KeyDown(object sender, KeyEventArgs e) {
+    protected virtual void dataGridView_KeyDown(object sender, KeyEventArgs e) {
       if (!ReadOnly && e.Control && e.KeyCode == Keys.V)
         PasteValuesToDataGridView();
@@ -398,28 +399,8 @@
     }
 
-    private void dataGridView_ColumnHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e) {
+    protected virtual void dataGridView_ColumnHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e) {
       if (Content != null) {
         if (e.Button == MouseButtons.Left && Content.SortableView) {
-          bool addToSortedIndices = (Control.ModifierKeys & Keys.Control) == Keys.Control;
-          SortOrder newSortOrder = SortOrder.Ascending;
-          if (sortedColumnIndices.Any(x => x.Key == e.ColumnIndex)) {
-            SortOrder oldSortOrder = sortedColumnIndices.Where(x => x.Key == e.ColumnIndex).First().Value;
-            int enumLength = Enum.GetValues(typeof(SortOrder)).Length;
-            newSortOrder = oldSortOrder = (SortOrder)Enum.Parse(typeof(SortOrder), ((((int)oldSortOrder) + 1) % enumLength).ToString());
-          }
-
-          if (!addToSortedIndices)
-            sortedColumnIndices.Clear();
-
-          if (sortedColumnIndices.Any(x => x.Key == e.ColumnIndex)) {
-            int sortedIndex = sortedColumnIndices.FindIndex(x => x.Key == e.ColumnIndex);
-            if (newSortOrder != SortOrder.None)
-              sortedColumnIndices[sortedIndex] = new KeyValuePair<int, SortOrder>(e.ColumnIndex, newSortOrder);
-            else
-              sortedColumnIndices.RemoveAt(sortedIndex);
-          } else
-            if (newSortOrder != SortOrder.None)
-              sortedColumnIndices.Add(new KeyValuePair<int, SortOrder>(e.ColumnIndex, newSortOrder));
-          Sort();
+          SortColumn(e.ColumnIndex);
         }
       }
@@ -438,4 +419,29 @@
       dataGridView.Invalidate();
     }
+
+    protected virtual void SortColumn(int columnIndex) {
+      bool addToSortedIndices = (Control.ModifierKeys & Keys.Control) == Keys.Control;
+      SortOrder newSortOrder = SortOrder.Ascending;
+      if (sortedColumnIndices.Any(x => x.Key == columnIndex)) {
+        SortOrder oldSortOrder = sortedColumnIndices.Where(x => x.Key == columnIndex).First().Value;
+        int enumLength = Enum.GetValues(typeof(SortOrder)).Length;
+        newSortOrder = oldSortOrder = (SortOrder)Enum.Parse(typeof(SortOrder), ((((int)oldSortOrder) + 1) % enumLength).ToString());
+      }
+
+      if (!addToSortedIndices)
+        sortedColumnIndices.Clear();
+
+      if (sortedColumnIndices.Any(x => x.Key == columnIndex)) {
+        int sortedIndex = sortedColumnIndices.FindIndex(x => x.Key == columnIndex);
+        if (newSortOrder != SortOrder.None)
+          sortedColumnIndices[sortedIndex] = new KeyValuePair<int, SortOrder>(columnIndex, newSortOrder);
+        else
+          sortedColumnIndices.RemoveAt(sortedIndex);
+      } else
+        if (newSortOrder != SortOrder.None)
+          sortedColumnIndices.Add(new KeyValuePair<int, SortOrder>(columnIndex, newSortOrder));
+      Sort();
+    }
+
     protected virtual int[] Sort(IEnumerable<KeyValuePair<int, SortOrder>> sortedColumns) {
       int[] newSortedIndex = Enumerable.Range(0, Content.Rows).ToArray();
@@ -510,5 +516,5 @@
     }
 
-    private void dataGridView_MouseClick(object sender, System.Windows.Forms.MouseEventArgs e) {
+    protected virtual void dataGridView_MouseClick(object sender, System.Windows.Forms.MouseEventArgs e) {
       if (Content == null) return;
       if (e.Button == MouseButtons.Right && Content.ColumnNames.Count() != 0)
@@ -543,5 +549,4 @@
 
     protected virtual void dataGridView_SelectionChanged(object sender, EventArgs e) {
-      string stringFormat = "{0,20:0.0000}";
       statisticsTextBox.Text = string.Empty;
       if (dataGridView.SelectedCells.Count > 1) {
@@ -553,15 +558,26 @@
         }
         if (selectedValues.Count > 1) {
-          StringBuilder labelText = new StringBuilder();
-          labelText.Append("Count: " + string.Format(stringFormat, selectedValues.Count) + "    ");
-          labelText.Append("Sum: " + string.Format(stringFormat, selectedValues.Sum()) + "    ");
-          labelText.Append("Min: " + string.Format(stringFormat, selectedValues.Min()) + "    ");
-          labelText.Append("Max: " + string.Format(stringFormat, selectedValues.Max()) + "    ");
-          labelText.Append("Average: " + string.Format(stringFormat, selectedValues.Average()) + "    ");
-          labelText.Append("Standard Deviation: " + string.Format(stringFormat, selectedValues.StandardDeviation()) + "    ");
-
-          statisticsTextBox.Text = labelText.ToString();
-        }
-      }
+          statisticsTextBox.Text = CreateStatisticsText(selectedValues);
+        }
+      }
+    }
+
+    protected virtual string CreateStatisticsText(ICollection<double> values) {
+      string stringFormat = "{0,20:0.0000}";
+      int overallCount = values.Count;
+      values = values.Where(x => !double.IsNaN(x)).ToList();
+      if (!values.Any()) {
+        return "";
+      }
+      StringBuilder statisticsText = new StringBuilder();
+      statisticsText.Append("Count: " + values.Count + "    ");
+      statisticsText.Append("Sum: " + string.Format(stringFormat, values.Sum()) + "    ");
+      statisticsText.Append("Min: " + string.Format(stringFormat, values.Min()) + "    ");
+      statisticsText.Append("Max: " + string.Format(stringFormat, values.Max()) + "    ");
+      statisticsText.Append("Average: " + string.Format(stringFormat, values.Average()) + "    ");
+      statisticsText.Append("Standard Deviation: " + string.Format(stringFormat, values.StandardDeviation()) + "    ");
+      if (overallCount > 0)
+        statisticsText.Append("Missing Values: " + string.Format(stringFormat, ((overallCount - values.Count) / (double)overallCount) * 100) + "%    ");
+      return statisticsText.ToString();
     }
   }
