Index: /trunk/sources/HeuristicLab.DataAnalysis/3.2/Dataset.cs
===================================================================
--- /trunk/sources/HeuristicLab.DataAnalysis/3.2/Dataset.cs	(revision 2310)
+++ /trunk/sources/HeuristicLab.DataAnalysis/3.2/Dataset.cs	(revision 2311)
@@ -147,4 +147,28 @@
       }
       throw new ArgumentException("The variable name " + variableName + " was not found.");
+    }
+
+    public double[] GetVariableValues(int variableIndex, int start, int end) {
+      if (start < 0 || !(start <= end))
+        throw new ArgumentException("Start must be between 0 and end (" + end + ").");
+      if (end > rows || end < start)
+        throw new ArgumentException("End must be between start (" + start + ") and dataset rows (" + rows + ").");
+
+      double[] values = new double[end - start];
+      for (int i = 0; i < end - start; i++)
+        values[i] = GetValue(i + start, variableIndex);
+      return values;
+    }
+
+    public double[] GetVariableValues(int variableIndex) {
+      return GetVariableValues(variableIndex, 0, this.rows);
+    }
+
+    public double[] GetVariableValues(string variableName, int start, int end) {
+      return GetVariableValues(GetVariableIndex(variableName), start, end);
+    }
+
+    public double[] GetVariableValues(string variableName) {
+      return GetVariableValues(variableName, 0, this.rows);
     }
 
Index: /trunk/sources/HeuristicLab.DataAnalysis/3.2/DatasetView.cs
===================================================================
--- /trunk/sources/HeuristicLab.DataAnalysis/3.2/DatasetView.cs	(revision 2310)
+++ /trunk/sources/HeuristicLab.DataAnalysis/3.2/DatasetView.cs	(revision 2311)
@@ -69,5 +69,5 @@
         // have been updated (and their SortMode set to 'NotSortable') we switch back to SelectionMode=ColumnHeaderSelect.
         dataGridView.SelectionMode = DataGridViewSelectionMode.CellSelect;
-        dataGridView.RowHeadersWidthSizeMode = DataGridViewRowHeadersWidthSizeMode.DisableResizing;
+        //dataGridView.RowHeadersWidthSizeMode = DataGridViewRowHeadersWidthSizeMode.DisableResizing;
         int rows = Dataset.Rows;
         int columns = Dataset.Columns;
@@ -90,5 +90,5 @@
         }
         dataGridView.SelectionMode = DataGridViewSelectionMode.ColumnHeaderSelect; // switch back to column selection
-        dataGridView.RowHeadersWidthSizeMode = DataGridViewRowHeadersWidthSizeMode.AutoSizeToAllHeaders;
+        //dataGridView.RowHeadersWidthSizeMode = DataGridViewRowHeadersWidthSizeMode.AutoSizeToAllHeaders;
       } else {
         rowsTextBox.Text = "1";
@@ -97,4 +97,21 @@
         dataGridView.RowCount = 1;
       }
+      UpdateRowHeaders();
+      this.dataGridView.AutoResizeColumns(DataGridViewAutoSizeColumnsMode.DisplayedCells);
+    }
+
+    private void UpdateRowHeaders() {
+      for (int i = dataGridView.FirstDisplayedScrollingRowIndex; i < dataGridView.FirstDisplayedScrollingRowIndex + dataGridView.DisplayedRowCount(true); i++)
+        dataGridView.Rows[i].HeaderCell.Value = i.ToString();
+      this.dataGridView.AutoResizeRowHeadersWidth(DataGridViewRowHeadersWidthSizeMode.AutoSizeToDisplayedHeaders);
+      dataGridView.Invalidate();
+    }
+
+    private void dataGridView_Scroll(object sender, ScrollEventArgs e) {
+      UpdateRowHeaders();
+    }
+
+    private void dataGridView_Resize(object sender, EventArgs e) {
+      UpdateRowHeaders();
     }
 
@@ -175,4 +192,6 @@
       Refresh();
     }
+
+  
   }
 }
Index: /trunk/sources/HeuristicLab.DataAnalysis/3.2/DatasetView.designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.DataAnalysis/3.2/DatasetView.designer.cs	(revision 2310)
+++ /trunk/sources/HeuristicLab.DataAnalysis/3.2/DatasetView.designer.cs	(revision 2311)
@@ -100,5 +100,7 @@
       this.dataGridView.Size = new System.Drawing.Size(554, 485);
       this.dataGridView.TabIndex = 3;
+      this.dataGridView.Scroll += new System.Windows.Forms.ScrollEventHandler(this.dataGridView_Scroll);
       this.dataGridView.CellValidating += new System.Windows.Forms.DataGridViewCellValidatingEventHandler(this.dataGridView_CellValidating);
+      this.dataGridView.Resize += new System.EventHandler(this.dataGridView_Resize);
       // 
       // contextMenuStrip
@@ -110,10 +112,10 @@
             this.originalValuesToolStripMenuItem});
       this.contextMenuStrip.Name = "contextMenuStrip";
-      this.contextMenuStrip.Size = new System.Drawing.Size(187, 92);
+      this.contextMenuStrip.Size = new System.Drawing.Size(198, 92);
       // 
       // scaleValuesToolStripMenuItem
       // 
       this.scaleValuesToolStripMenuItem.Name = "scaleValuesToolStripMenuItem";
-      this.scaleValuesToolStripMenuItem.Size = new System.Drawing.Size(186, 22);
+      this.scaleValuesToolStripMenuItem.Size = new System.Drawing.Size(197, 22);
       this.scaleValuesToolStripMenuItem.Text = "Scale values [0..1]";
       this.scaleValuesToolStripMenuItem.Click += new System.EventHandler(this.scaleValuesToolStripMenuItem_Click);
@@ -122,5 +124,5 @@
       // 
       this.scaleValuesmanuallyToolStripMenuItem.Name = "scaleValuesmanuallyToolStripMenuItem";
-      this.scaleValuesmanuallyToolStripMenuItem.Size = new System.Drawing.Size(186, 22);
+      this.scaleValuesmanuallyToolStripMenuItem.Size = new System.Drawing.Size(197, 22);
       this.scaleValuesmanuallyToolStripMenuItem.Text = "Scale values (manually)";
       this.scaleValuesmanuallyToolStripMenuItem.Click += new System.EventHandler(this.scaleValuesmanuallyToolStripMenuItem_Click);
@@ -129,5 +131,5 @@
       // 
       this.showScalingToolStripMenuItem.Name = "showScalingToolStripMenuItem";
-      this.showScalingToolStripMenuItem.Size = new System.Drawing.Size(186, 22);
+      this.showScalingToolStripMenuItem.Size = new System.Drawing.Size(197, 22);
       this.showScalingToolStripMenuItem.Text = "Show scaling...";
       this.showScalingToolStripMenuItem.Click += new System.EventHandler(this.showScalingToolStripMenuItem_Click);
@@ -136,5 +138,5 @@
       // 
       this.originalValuesToolStripMenuItem.Name = "originalValuesToolStripMenuItem";
-      this.originalValuesToolStripMenuItem.Size = new System.Drawing.Size(186, 22);
+      this.originalValuesToolStripMenuItem.Size = new System.Drawing.Size(197, 22);
       this.originalValuesToolStripMenuItem.Text = "Unscale values";
       this.originalValuesToolStripMenuItem.Click += new System.EventHandler(this.originalValuesToolStripMenuItem_Click);
