Index: TvSchedules.cs
===================================================================
--- TvSchedules.cs	(Revision 27464)
+++ TvSchedules.cs	(Arbeitskopie)
@@ -25,18 +25,24 @@
 using System.Globalization;
 using TvControl;
 using TvDatabase;
+using MediaPortal.UserInterface.Controls;
 
 namespace SetupTv.Sections
 {
   public partial class TvSchedules : SectionSettings
   {
+    private readonly MPListViewStringColumnSorter lvwColumnSorter;
+
     public TvSchedules()
-      : this("Schedules") {}
+      : this("Schedules") { }
 
     public TvSchedules(string name)
       : base(name)
     {
       InitializeComponent();
+      lvwColumnSorter = new MPListViewStringColumnSorter();
+      lvwColumnSorter.Order = SortOrder.None;
+      listView1.ListViewItemSorter = lvwColumnSorter;
     }
 
     public override void OnSectionActivated()
@@ -114,10 +120,28 @@
         }
         listView1.Items.Add(item);
       }
-
       listView1.AutoResizeColumns(ColumnHeaderAutoResizeStyle.HeaderSize);
     }
 
+    private void listView1_ColumnClick(object sender, ColumnClickEventArgs e)
+    {
+      if (e.Column == lvwColumnSorter.SortColumn)
+      {
+        // Reverse the current sort direction for this column.
+        lvwColumnSorter.Order = lvwColumnSorter.Order == SortOrder.Ascending
+                                  ? SortOrder.Descending
+                                  : SortOrder.Ascending;
+      }
+      else
+      {
+        // Set the column number that is to be sorted; default to ascending.
+        lvwColumnSorter.SortColumn = e.Column;
+        lvwColumnSorter.Order = SortOrder.Ascending;
+      }
+      // Perform the sort with these new sort options.
+      listView1.Sort();
+    }
+
     private void deleteToolStripMenuItem_Click(object sender, EventArgs e)
     {
       mpButtonDel_Click(null, null);
Index: TvSchedules.Designer.cs
===================================================================
--- TvSchedules.Designer.cs	(Revision 27464)
+++ TvSchedules.Designer.cs	(Arbeitskopie)
@@ -128,6 +128,7 @@
       this.listView1.TabIndex = 3;
       this.listView1.UseCompatibleStateImageBehavior = false;
       this.listView1.View = System.Windows.Forms.View.Details;
+      this.listView1.ColumnClick += new System.Windows.Forms.ColumnClickEventHandler(this.listView1_ColumnClick);
       // 
       // columnHeader5
       // 
@@ -198,21 +199,21 @@
     #endregion
 
     private System.Windows.Forms.ImageList imageList1;
-      private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
-      private System.Windows.Forms.ToolStripMenuItem deleteToolStripMenuItem;
-      private System.Windows.Forms.ToolStripSeparator toolStripMenuItem1;
-      private System.Windows.Forms.TabControl tabControl1;
-      private System.Windows.Forms.TabPage tabPage1;
-      private System.Windows.Forms.ListView listView1;
-      private System.Windows.Forms.ColumnHeader columnHeader5;
-      private System.Windows.Forms.ColumnHeader columnHeader1;
-      private System.Windows.Forms.ColumnHeader columnHeader4;
-      private System.Windows.Forms.ColumnHeader columnHeader2;
-      private System.Windows.Forms.ColumnHeader columnHeader3;
-      private System.Windows.Forms.ColumnHeader PreRecord;
-		private System.Windows.Forms.ColumnHeader PostRecord;
-      private MediaPortal.UserInterface.Controls.MPLabel mpLabelChannelCount;
+    private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
+    private System.Windows.Forms.ToolStripMenuItem deleteToolStripMenuItem;
+    private System.Windows.Forms.ToolStripSeparator toolStripMenuItem1;
+    private System.Windows.Forms.TabControl tabControl1;
+    private System.Windows.Forms.TabPage tabPage1;
+    private System.Windows.Forms.ListView listView1;
+    private System.Windows.Forms.ColumnHeader columnHeader5;
+    private System.Windows.Forms.ColumnHeader columnHeader1;
+    private System.Windows.Forms.ColumnHeader columnHeader4;
+    private System.Windows.Forms.ColumnHeader columnHeader2;
+    private System.Windows.Forms.ColumnHeader columnHeader3;
+    private System.Windows.Forms.ColumnHeader PreRecord;
+    private System.Windows.Forms.ColumnHeader PostRecord;
+    private MediaPortal.UserInterface.Controls.MPLabel mpLabelChannelCount;
     private MediaPortal.UserInterface.Controls.MPButton mpButtonDel;
-      private System.Windows.Forms.ColumnHeader EpisodesToKeep;
+    private System.Windows.Forms.ColumnHeader EpisodesToKeep;
   }
 }
\ No newline at end of file
