Пример #1
0
 /// <summary>
 /// Sorts this table according to the specified sort parameters.
 /// </summary>
 public void Sort(TableSortParams sortParams)
 {
     _sortParams = sortParams;
     Sort();
 }
Пример #2
0
        private void _sortButtonDropDownItem_Click(object sender, EventArgs e)
        {
            var item = sender as ToolStripItem;
            var sortColumn = CollectionUtils.SelectFirst(_table.Columns, (ITableColumn column) => column.Name.Equals(item.Name));

            if (sortColumn != null)
            {
                var direction = _table.SortParams == null ? true : _table.SortParams.Ascending;
                var sortParams = new TableSortParams(sortColumn, direction);
                _table.Sort(sortParams);
            }
        }