Exemplo n.º 1
0
        private void HideColumns(object sender, EventArgs e)
        {
            var selectedColumns  = _table.GetSelectedDataColumnIndexes(_clickedColumnIndex);
            var newColumnIndexes = ColumnSelector.ToIndexes(_stylingOptions.VisibleColumns, _table.DataColumnCount).Except(selectedColumns);
            var newSelector      = ColumnSelector.FromIndexes(newColumnIndexes);

            SetColumnSelector(newSelector);
        }
Exemplo n.º 2
0
        public void FromIndexesTest()
        {
            var selector = ColumnSelector.FromIndexes(new[] { 35, 2, 31, 33, 34, 40, 56, 10, 10 });

            Assert.Equal("2:10:31:33-35:40:56", selector);

            selector = ColumnSelector.FromIndexes(new[] { 35, 34, 33 });
            Assert.Equal("33-35", selector);
        }