Exemple #1
0
 public void BackupSorting()
 {
     if (base.Rows.Count > 0)
     {
         this._sortData = new MyDataGridView.SortingData(this);
     }
 }
Exemple #2
0
 public void RestoreSorting()
 {
     if (base.Rows.Count == 0 || this._sortData == null)
     {
         return;
     }
     if (this._sortData.SortedColumn != null)
     {
         this.Sort(this._sortData.SortedColumn, (this._sortData.SortOrder == System.Windows.Forms.SortOrder.Ascending ? ListSortDirection.Ascending : ListSortDirection.Descending));
     }
     if (this._sortData.Point != new Point(-1, -1) && base.Rows.Count > this._sortData.Point.Y)
     {
         base.CurrentCell = base[this._sortData.Point.X, this._sortData.Point.Y];
     }
     foreach (int num in
              from index in this._sortData.SelectedIndexes
              where base.Rows.Count > index
              select index)
     {
         base.Rows[num].Selected = true;
     }
     this._sortData = null;
 }