Index: branches/OKB/HeuristicLab.Clients.OKB-3.3/OKBClient.cs
===================================================================
--- branches/OKB/HeuristicLab.Clients.OKB-3.3/OKBClient.cs	(revision 4965)
+++ branches/OKB/HeuristicLab.Clients.OKB-3.3/OKBClient.cs	(revision 5071)
@@ -365,4 +365,5 @@
         ItemCollection<Experiment> experiments = new ItemCollection<Experiment>();
         experiments.AddRange(CallAdminService<Experiment[]>(s => s.GetExperiments(algorithmId, problemId)));
+        experiments.ItemsRemoved += new CollectionItemsChangedEventHandler<Experiment>(experiments_ItemsRemoved);
         return experiments;
       }
@@ -379,4 +380,5 @@
         ItemCollection<Run> runs = new ItemCollection<Run>();
         runs.AddRange(CallAdminService<Run[]>(s => s.GetRuns(experimentId)).OrderByDescending(x => x.FinishedDate));
+        runs.ItemsRemoved += new CollectionItemsChangedEventHandler<Run>(runs_ItemsRemoved);
         return runs;
       }
@@ -659,4 +661,22 @@
       }
     }
+    private void experiments_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<Experiment> e) {
+      try {
+        foreach (Experiment exp in e.Items)
+          CallAdminService(s => s.DeleteExperiment(exp.Id));
+      }
+      catch (Exception ex) {
+        ErrorHandling.ShowErrorDialog("Delete failed.", ex);
+      }
+    }
+    private void runs_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<Run> e) {
+      try {
+        foreach (Run r in e.Items)
+          CallAdminService(s => s.DeleteRun(r.Id));
+      }
+      catch (Exception ex) {
+        ErrorHandling.ShowErrorDialog("Delete failed.", ex);
+      }
+    }
     #endregion
 
Index: branches/OKB/HeuristicLab.Services.OKB/3.3/OKBService.cs
===================================================================
--- branches/OKB/HeuristicLab.Services.OKB/3.3/OKBService.cs	(revision 4965)
+++ branches/OKB/HeuristicLab.Services.OKB/3.3/OKBService.cs	(revision 5071)
@@ -476,5 +476,30 @@
     }
     public void DeleteExperiment(long id) {
-      using (OKBDataContext okb = new OKBDataContext()) {
+      foreach (DataTransfer.Run run in GetRuns(id))
+        DeleteRun(run.Id);
+
+      using (OKBDataContext okb = new OKBDataContext()) {
+        IEnumerable<DataAccess.AlgorithmParameterBlobValue> algorithmParameterBlobValues = okb.AlgorithmParameterBlobValues.Where(x => x.ExperimentId == id);
+        okb.AlgorithmParameterBlobValues.DeleteAllOnSubmit(algorithmParameterBlobValues);
+        IEnumerable<DataAccess.AlgorithmParameterBoolValue> algorithmParameterBoolValues = okb.AlgorithmParameterBoolValues.Where(x => x.ExperimentId == id);
+        okb.AlgorithmParameterBoolValues.DeleteAllOnSubmit(algorithmParameterBoolValues);
+        IEnumerable<DataAccess.AlgorithmParameterFloatValue> algorithmParameterFloatValues = okb.AlgorithmParameterFloatValues.Where(x => x.ExperimentId == id);
+        okb.AlgorithmParameterFloatValues.DeleteAllOnSubmit(algorithmParameterFloatValues);
+        IEnumerable<DataAccess.AlgorithmParameterIntValue> algorithmParameterIntValues = okb.AlgorithmParameterIntValues.Where(x => x.ExperimentId == id);
+        okb.AlgorithmParameterIntValues.DeleteAllOnSubmit(algorithmParameterIntValues);
+        IEnumerable<DataAccess.AlgorithmParameterStringValue> algorithmParameterStringValues = okb.AlgorithmParameterStringValues.Where(x => x.ExperimentId == id);
+        okb.AlgorithmParameterStringValues.DeleteAllOnSubmit(algorithmParameterStringValues);
+
+        IEnumerable<DataAccess.ProblemParameterBlobValue> problemParameterBlobValues = okb.ProblemParameterBlobValues.Where(x => x.ExperimentId == id);
+        okb.ProblemParameterBlobValues.DeleteAllOnSubmit(problemParameterBlobValues);
+        IEnumerable<DataAccess.ProblemParameterBoolValue> problemParameterBoolValues = okb.ProblemParameterBoolValues.Where(x => x.ExperimentId == id);
+        okb.ProblemParameterBoolValues.DeleteAllOnSubmit(problemParameterBoolValues);
+        IEnumerable<DataAccess.ProblemParameterFloatValue> problemParameterFloatValues = okb.ProblemParameterFloatValues.Where(x => x.ExperimentId == id);
+        okb.ProblemParameterFloatValues.DeleteAllOnSubmit(problemParameterFloatValues);
+        IEnumerable<DataAccess.ProblemParameterIntValue> problemParameterIntValues = okb.ProblemParameterIntValues.Where(x => x.ExperimentId == id);
+        okb.ProblemParameterIntValues.DeleteAllOnSubmit(problemParameterIntValues);
+        IEnumerable<DataAccess.ProblemParameterStringValue> problemParameterStringValues = okb.ProblemParameterStringValues.Where(x => x.ExperimentId == id);
+        okb.ProblemParameterStringValues.DeleteAllOnSubmit(problemParameterStringValues);
+
         DataAccess.Experiment entity = okb.Experiments.FirstOrDefault(x => x.Id == id);
         if (entity != null) okb.Experiments.DeleteOnSubmit(entity);
@@ -519,4 +544,15 @@
     public void DeleteRun(long id) {
       using (OKBDataContext okb = new OKBDataContext()) {
+        IEnumerable<DataAccess.ResultBlobValue> resultBlobValues = okb.ResultBlobValues.Where(x => x.RunId == id);
+        okb.ResultBlobValues.DeleteAllOnSubmit(resultBlobValues);
+        IEnumerable<DataAccess.ResultBoolValue> resultBoolValues = okb.ResultBoolValues.Where(x => x.RunId == id);
+        okb.ResultBoolValues.DeleteAllOnSubmit(resultBoolValues);
+        IEnumerable<DataAccess.ResultFloatValue> resultFloatValues = okb.ResultFloatValues.Where(x => x.RunId == id);
+        okb.ResultFloatValues.DeleteAllOnSubmit(resultFloatValues);
+        IEnumerable<DataAccess.ResultIntValue> resultIntValues = okb.ResultIntValues.Where(x => x.RunId == id);
+        okb.ResultIntValues.DeleteAllOnSubmit(resultIntValues);
+        IEnumerable<DataAccess.ResultStringValue> resultStringValues = okb.ResultStringValues.Where(x => x.RunId == id);
+        okb.ResultStringValues.DeleteAllOnSubmit(resultStringValues);
+
         DataAccess.Run entity = okb.Runs.FirstOrDefault(x => x.Id == id);
         if (entity != null) okb.Runs.DeleteOnSubmit(entity);
