Exemple #1
0
        private void _flex_BeforeSort(object sender, C1.Win.C1FlexGrid.SortColEventArgs e)
        {
            // cancel built-in sorting
            e.Cancel = true;

            // sort using custom comparer
            IComparer comp = new NullComparer(sender as C1FlexGrid, e);

            _flex.Sort(comp);

            // update display and current sort order
            _flex.ShowSortAt(e.Order, e.Col);
        }
Exemple #2
0
        private void _flex_BeforeSort(object sender, C1.Win.C1FlexGrid.SortColEventArgs e)
        {
            // use custom sorting for column "Name" (sort files by extension)
            if (_flex.Cols[e.Col].Name == "Name")
            {
                // hadle the sort ourselves
                Cursor = Cursors.WaitCursor;
                _flex.Sort(new FileNameComparer(_flex, e.Order));
                Cursor = null;

                // tell control we handled it
                e.Handled = true;
            }
        }
Exemple #3
0
 // intercept sort command and sort by mapped column instead
 void _flex_BeforeSort(object sender, C1.Win.C1FlexGrid.SortColEventArgs e)
 {
     if (_flex.Cols[e.Col].Name == "CustomerID")
     {
         int col = _flex.Cols["CustomerMapped"].Index;
         _flex.Sort(e.Order, col);
         _flex.ShowSortAt(e.Order, col);
         e.Handled = true;
     }
     else if (_flex.Cols[e.Col].Name == "EmployeeID")
     {
         int col = _flex.Cols["EmployeeMapped"].Index;
         _flex.Sort(e.Order, col);
         _flex.ShowSortAt(e.Order, col);
         e.Handled = true;
     }
 }
        private void gridMensagens_AfterSort(object sender, C1.Win.C1FlexGrid.SortColEventArgs e)
        {
            //conversão das colunas
            int coluna = 255;

            switch (e.Col)
            {
            case 3: coluna = SEM_ORDENACAO; break;

            case 4: coluna = COLUNA_NOME; break;
            }

            //Sort na lista
            SortList(coluna, true);
            fachada.AtualizarIndicesMensagens(controladorSelecionado);

            LimparGridMensagens();
            PopulaMensagensGrid(fachada.CarregarMensagens(controladorSelecionado, painelSelecionado));
        }
Exemple #5
0
 // ** ctor
 public NullComparer(C1.Win.C1FlexGrid.C1FlexGrid flex, C1.Win.C1FlexGrid.SortColEventArgs e)
 {
     _flex  = flex;
     _order = e.Order;
     _col   = e.Col;
 }