Index: trunk/sources/HeuristicLab.Data.Views/3.3/StringConvertibleMatrixView.cs
===================================================================
--- trunk/sources/HeuristicLab.Data.Views/3.3/StringConvertibleMatrixView.cs	(revision 3319)
+++ trunk/sources/HeuristicLab.Data.Views/3.3/StringConvertibleMatrixView.cs	(revision 3320)
@@ -61,4 +61,6 @@
       Content.ItemChanged -= new EventHandler<EventArgs<int, int>>(Content_ItemChanged);
       Content.Reset -= new EventHandler(Content_Reset);
+      Content.ColumnNamesChanged -= new EventHandler(Content_ColumnNamesChanged);
+      Content.RowNamesChanged -= new EventHandler(Content_RowNamesChanged);
       base.DeregisterContentEvents();
     }
@@ -69,5 +71,9 @@
       Content.ItemChanged += new EventHandler<EventArgs<int, int>>(Content_ItemChanged);
       Content.Reset += new EventHandler(Content_Reset);
-    }
+      Content.ColumnNamesChanged += new EventHandler(Content_ColumnNamesChanged);
+      Content.RowNamesChanged += new EventHandler(Content_RowNamesChanged);
+    }
+
+
 
     protected override void OnContentChanged() {
@@ -128,4 +134,12 @@
     }
 
+    private void Content_RowNamesChanged(object sender, EventArgs e) {
+      UpdateColumnHeaders();
+    }
+
+    private void Content_ColumnNamesChanged(object sender, EventArgs e) {
+      UpdateRowHeaders();
+    }
+
     private void Content_ItemChanged(object sender, EventArgs<int, int> e) {
       if (InvokeRequired)
@@ -218,33 +232,32 @@
 
     private void dataGridView_ColumnHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e) {
-      //if (Content != null && Content.SortableView) {
-      if (e.Button == MouseButtons.Left) {
-        bool addToSortedIndizes = (Control.ModifierKeys & Keys.Control) == Keys.Control;
-        SortOrder newSortOrder = SortOrder.Ascending;
-        if (sortedColumnIndizes.Any(x => x.Key == e.ColumnIndex)) {
-          SortOrder oldSortOrder = sortedColumnIndizes.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 (Content != null) {
+        if (e.Button == MouseButtons.Left && Content.SortableView) {
+          bool addToSortedIndizes = (Control.ModifierKeys & Keys.Control) == Keys.Control;
+          SortOrder newSortOrder = SortOrder.Ascending;
+          if (sortedColumnIndizes.Any(x => x.Key == e.ColumnIndex)) {
+            SortOrder oldSortOrder = sortedColumnIndizes.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 (!addToSortedIndizes)
+            sortedColumnIndizes.Clear();
+
+          if (sortedColumnIndizes.Any(x => x.Key == e.ColumnIndex)) {
+            int sortedIndex = sortedColumnIndizes.FindIndex(x => x.Key == e.ColumnIndex);
+            if (newSortOrder != SortOrder.None)
+              sortedColumnIndizes[sortedIndex] = new KeyValuePair<int, SortOrder>(e.ColumnIndex, newSortOrder);
+            else
+              sortedColumnIndizes.RemoveAt(sortedIndex);
+          } else
+            if (newSortOrder != SortOrder.None)
+              sortedColumnIndizes.Add(new KeyValuePair<int, SortOrder>(e.ColumnIndex, newSortOrder));
+          Sort();
+        } else if (e.Button == MouseButtons.Right) {
+          if (Content.ColumnNames.Count() != 0)
+            contextMenu.Show(MousePosition);
         }
-
-        if (!addToSortedIndizes)
-          sortedColumnIndizes.Clear();
-
-        if (sortedColumnIndizes.Any(x => x.Key == e.ColumnIndex)) {
-          int sortedIndex = sortedColumnIndizes.FindIndex(x => x.Key == e.ColumnIndex);
-          if (newSortOrder != SortOrder.None)
-            sortedColumnIndizes[sortedIndex] = new KeyValuePair<int, SortOrder>(e.ColumnIndex, newSortOrder);
-          else
-            sortedColumnIndizes.RemoveAt(sortedIndex);
-        } else
-          if (newSortOrder != SortOrder.None)
-            sortedColumnIndizes.Add(new KeyValuePair<int, SortOrder>(e.ColumnIndex, newSortOrder));
-        Sort();
-      } else if (e.Button == MouseButtons.Right) {
-        if (Content.ColumnNames.Count() != 0)
-          contextMenu.Show(MousePosition);
-      }
-
-      //}
+      }
     }
 
Index: trunk/sources/HeuristicLab.Data/3.3/BoolMatrix.cs
===================================================================
--- trunk/sources/HeuristicLab.Data/3.3/BoolMatrix.cs	(revision 3319)
+++ trunk/sources/HeuristicLab.Data/3.3/BoolMatrix.cs	(revision 3320)
@@ -89,4 +89,8 @@
       set { this.RowNames = value; }
     }
+    bool IStringConvertibleMatrix.SortableView {
+      get { return this.SortableView; }
+      set { this.SortableView = value; }
+    }
     bool IStringConvertibleMatrix.Validate(string value, out string errorMessage) {
       return Validate(value, out errorMessage);
Index: trunk/sources/HeuristicLab.Data/3.3/DoubleMatrix.cs
===================================================================
--- trunk/sources/HeuristicLab.Data/3.3/DoubleMatrix.cs	(revision 3319)
+++ trunk/sources/HeuristicLab.Data/3.3/DoubleMatrix.cs	(revision 3320)
@@ -89,4 +89,8 @@
       set { this.RowNames = value; }
     }
+    bool IStringConvertibleMatrix.SortableView {
+      get { return this.SortableView; }
+      set { this.SortableView = value; }
+    }
     bool IStringConvertibleMatrix.Validate(string value, out string errorMessage) {
       return Validate(value, out errorMessage);
Index: trunk/sources/HeuristicLab.Data/3.3/IStringConvertibleMatrix.cs
===================================================================
--- trunk/sources/HeuristicLab.Data/3.3/IStringConvertibleMatrix.cs	(revision 3319)
+++ trunk/sources/HeuristicLab.Data/3.3/IStringConvertibleMatrix.cs	(revision 3320)
@@ -21,16 +21,16 @@
 
 using System;
+using System.Collections.Generic;
 using HeuristicLab.Common;
-using System.Collections.Generic;
 
 namespace HeuristicLab.Data {
   public interface IStringConvertibleMatrix {
-    bool ReadOnlyView { get; set; }
     int Rows { get; set; }
     int Columns { get; set; }
-
     IEnumerable<string> ColumnNames { get; set; }
     IEnumerable<string> RowNames { get; set; }
-    //bool SortableView { get; }
+
+    bool ReadOnlyView { get; set; }
+    bool SortableView { get; set; }
 
     bool Validate(string value, out string errorMessage);
@@ -38,5 +38,8 @@
     bool SetValue(string value, int rowIndex, int columnIndex);
 
+    event EventHandler ColumnNamesChanged;
+    event EventHandler RowNamesChanged;
     event EventHandler ReadOnlyViewChanged;
+    event EventHandler SortableViewChanged;
     event EventHandler<EventArgs<int, int>> ItemChanged;
     event EventHandler Reset;
Index: trunk/sources/HeuristicLab.Data/3.3/StringMatrix.cs
===================================================================
--- trunk/sources/HeuristicLab.Data/3.3/StringMatrix.cs	(revision 3319)
+++ trunk/sources/HeuristicLab.Data/3.3/StringMatrix.cs	(revision 3320)
@@ -67,4 +67,15 @@
       }
     }
+    [Storable]
+    private bool sortableView;
+    public bool SortableView {
+      get { return sortableView; }
+      set {
+        if (value != sortableView) {
+          sortableView = value;
+          OnSortableViewChanged();
+        }
+      }
+    }
 
     public virtual int Rows {
@@ -75,4 +86,8 @@
           Array.Copy(matrix, newMatrix, Math.Min(value * Columns, matrix.Length));
           matrix = newMatrix;
+          while (rowNames.Count > value)
+            rowNames.RemoveAt(rowNames.Count - 1);
+          while (rowNames.Count < value)
+            rowNames.Add("Row " + rowNames.Count);
           OnReset();
         }
@@ -87,4 +102,8 @@
             Array.Copy(matrix, i * Columns, newMatrix, i * value, Math.Min(value, Columns));
           matrix = newMatrix;
+          while (columnNames.Count > value)
+            columnNames.RemoveAt(columnNames.Count - 1);
+          while (columnNames.Count < value)
+            columnNames.Add("Column " + columnNames.Count);
           OnReset();
         }
@@ -107,4 +126,5 @@
       columnNames = new List<string>();
       rowNames = new List<string>();
+      sortableView = false;
     }
     public StringMatrix(int rows, int columns) {
@@ -116,4 +136,5 @@
       columnNames = new List<string>();
       rowNames = new List<string>();
+      sortableView = false;
     }
     protected StringMatrix(int rows, int columns, IEnumerable<string> columnNames)
@@ -134,4 +155,5 @@
       columnNames = new List<string>();
       rowNames = new List<string>();
+      sortableView = false;
     }
     protected StringMatrix(string[,] elements, IEnumerable<string> columnNames)
@@ -148,4 +170,5 @@
       cloner.RegisterClonedObject(this, clone);
       clone.ReadOnlyView = ReadOnlyView;
+      clone.SortableView = SortableView;
       clone.matrix = (string[,])matrix.Clone();
       clone.columnNames = new List<string>(columnNames);
@@ -194,4 +217,22 @@
     }
 
+    public event EventHandler ColumnNamesChanged;
+    protected virtual void OnColumnNamesChanged() {
+      EventHandler handler = ColumnNamesChanged;
+      if (handler != null)
+        handler(this, EventArgs.Empty);
+    }
+    public event EventHandler RowNamesChanged;
+    protected virtual void OnRowNamesChanged() {
+      EventHandler handler = RowNamesChanged;
+      if (handler != null)
+        handler(this, EventArgs.Empty);
+    }
+    public event EventHandler SortableViewChanged;
+    protected virtual void OnSortableViewChanged() {
+      EventHandler handler = SortableViewChanged;
+      if (handler != null)
+        handler(this, EventArgs.Empty);
+    }
     public event EventHandler<EventArgs<int, int>> ItemChanged;
     protected virtual void OnItemChanged(int rowIndex, int columnIndex) {
@@ -224,4 +265,8 @@
       set { this.RowNames = value; }
     }
+    bool IStringConvertibleMatrix.SortableView {
+      get { return this.SortableView; }
+      set { this.SortableView = value; }
+    }
     bool IStringConvertibleMatrix.Validate(string value, out string errorMessage) {
       return Validate(value, out errorMessage);
Index: trunk/sources/HeuristicLab.Data/3.3/ValueTypeMatrix.cs
===================================================================
--- trunk/sources/HeuristicLab.Data/3.3/ValueTypeMatrix.cs	(revision 3319)
+++ trunk/sources/HeuristicLab.Data/3.3/ValueTypeMatrix.cs	(revision 3320)
@@ -67,4 +67,15 @@
       }
     }
+    [Storable]
+    private bool sortableView;
+    public bool SortableView {
+      get { return sortableView; }
+      set {
+        if (value != sortableView) {
+          sortableView = value;
+          OnSortableViewChanged();
+        }
+      }
+    }
 
     public virtual int Rows {
@@ -75,4 +86,8 @@
           Array.Copy(matrix, newArray, Math.Min(value * Columns, matrix.Length));
           matrix = newArray;
+          while (rowNames.Count > value)
+            rowNames.RemoveAt(rowNames.Count - 1);
+          while (rowNames.Count < value)
+            rowNames.Add("Row " + rowNames.Count);
           OnReset();
         }
@@ -87,4 +102,8 @@
             Array.Copy(matrix, i * Columns, newArray, i * value, Math.Min(value, Columns));
           matrix = newArray;
+          while (columnNames.Count > value)
+            columnNames.RemoveAt(columnNames.Count - 1);
+          while (columnNames.Count < value)
+            columnNames.Add("Column " + columnNames.Count);
           OnReset();
         }
@@ -105,4 +124,5 @@
       columnNames = new List<string>();
       rowNames = new List<string>();
+      sortableView = false;
     }
     protected ValueTypeMatrix(int rows, int columns) {
@@ -110,4 +130,5 @@
       columnNames = new List<string>();
       rowNames = new List<string>();
+      sortableView = false;
     }
     protected ValueTypeMatrix(int rows, int columns, IEnumerable<string> columnNames)
@@ -124,4 +145,5 @@
       columnNames = new List<string>();
       rowNames = new List<string>();
+      sortableView = false;
     }
     protected ValueTypeMatrix(T[,] elements, IEnumerable<string> columnNames)
@@ -136,4 +158,5 @@
     public override IDeepCloneable Clone(Cloner cloner) {
       ValueTypeMatrix<T> clone = (ValueTypeMatrix<T>)base.Clone(cloner);
+      clone.SortableView = SortableView;
       clone.matrix = (T[,])matrix.Clone();
       clone.columnNames = new List<string>(columnNames);
@@ -161,4 +184,22 @@
     }
 
+    public event EventHandler ColumnNamesChanged;
+    protected virtual void OnColumnNamesChanged() {
+      EventHandler handler = ColumnNamesChanged;
+      if(handler!=null)
+        handler(this,EventArgs.Empty);
+    }
+    public event EventHandler RowNamesChanged;
+    protected virtual void OnRowNamesChanged() {
+      EventHandler handler = RowNamesChanged;
+      if (handler != null)
+        handler(this, EventArgs.Empty);
+    }
+    public event EventHandler SortableViewChanged;
+    protected virtual void OnSortableViewChanged() {
+      EventHandler handler = SortableViewChanged;
+      if (handler != null)
+        handler(this, EventArgs.Empty);
+    }
     public event EventHandler<EventArgs<int, int>> ItemChanged;
     protected virtual void OnItemChanged(int rowIndex, int columnIndex) {
