Exemple #1
0
        protected override void OnColumnClick(ColumnClickEventArgs e)
        {
            if (Items.Count == 0)
            {
                return;
            }
            ListViewItemSorter = new ListViewItemComparer(e.Column);
            Sort();
            ListViewItemSorter = null;
            base.OnColumnClick(e);
            switch (Sorting)
            {
            case SortOrder.None:
            case SortOrder.Ascending:
                Sorting = SortOrder.Descending;
                break;

            case SortOrder.Descending:
                Sorting = SortOrder.Ascending;
                break;
            }
        }
Exemple #2
0
        protected override void OnColumnClick(ColumnClickEventArgs e)
        {
            if (Items.Count == 0)
                return;
            ListViewItemSorter = new ListViewItemComparer(e.Column);
            Sort();
            ListViewItemSorter = null;
            base.OnColumnClick(e);
            switch (Sorting)
            {
                case SortOrder.None:
                case SortOrder.Ascending:
                    Sorting = SortOrder.Descending;
                    break;

                case SortOrder.Descending:
                    Sorting = SortOrder.Ascending;
                    break;
            }
        }