Exemplo n.º 1
0
        private void OnItemsSourceChanged(SyncfusionRoutedEventArgs args)
        {
            GridDataControl grid = args.Source as GridDataControl;

            if (grid.GroupedColumns.Count > 0)
            {
                grid.Model.Table.ExpandAllGroupsAtLevel(1);
            }
        }
Exemplo n.º 2
0
        void grid_CurrentCellActivated(object sender, SyncfusionRoutedEventArgs args)
        {
            GridControlBase current_cell = args.Source as GridControlBase;

            if (grid.Model[current_cell.CurrentCell.RowIndex, current_cell.CurrentCell.ColumnIndex].CellType == "DateTimeEdit")
            {
                g = grid.Model[current_cell.CurrentCell.RowIndex, current_cell.CurrentCell.ColumnIndex];
                SetTheDateTimeFormatCombo();
                SetTheCultureInfoFormatCombo();
            }
        }
Exemplo n.º 3
0
        void grid_CurrentCellActivated(object sender, SyncfusionRoutedEventArgs args)
        {
            GridControlBase current_cell = args.Source as GridControlBase;

            if (grid.Model[current_cell.CurrentCell.RowIndex, current_cell.CurrentCell.ColumnIndex].CellType == "IntegerEdit")
            {
                g = grid.Model[current_cell.CurrentCell.RowIndex, current_cell.CurrentCell.ColumnIndex];
                SetSeperatorText();
                SetNumberOfDigitsText();
            }
        }
Exemplo n.º 4
0
        void grid_CurrentCellActivated(object sender, SyncfusionRoutedEventArgs args)
        {
            GridControlBase current_cell = args.Source as GridControlBase;

            if (grid.Model[current_cell.CurrentCell.RowIndex, current_cell.CurrentCell.ColumnIndex].CellType == "PercentEdit")
            {
                g = grid.Model[current_cell.CurrentCell.RowIndex, current_cell.CurrentCell.ColumnIndex];
                SetPercentSeperatorText();
                SetNumGroupText();
                SetPercentDecimalDigitsText();
                SetPercentSymbolText();
                setPercentEditModeText();
            }
        }
        void AssociatedObject_CurrentCellEditingComplete(object sender, SyncfusionRoutedEventArgs args)
        {
            GridControl currentgrid = sender as GridControl;

            if (currentgrid != null && currentgrid.CurrentCell.HasCurrentCell)
            {
                var currentcell      = currentgrid.CurrentCell;
                var currentCellStyle = currentgrid.Model[currentcell.RowIndex, currentcell.ColumnIndex];
                if (currentCellStyle != null && currentCellStyle.CellType == "FormulaCell" && currentCellStyle.FormulaTag != null)
                {
                    CurrentCellAlignment = currentCellStyle.HorizontalAlignment;
                    currentCellStyle.HorizontalAlignment = System.Windows.HorizontalAlignment.Right;
                }
            }
        }
Exemplo n.º 6
0
        void grid_CurrentCellActivated(object sender, SyncfusionRoutedEventArgs args)
        {
            var rowIndex = grid.CurrentCell.RowIndex;
            var colIndex = grid.CurrentCell.ColumnIndex;
            var style    = grid.Model[rowIndex, colIndex];

            if (style.CellType == "CurrencyEdit")
            {
                g = style;
                SetPositivePatternCombo();
                SetGroupNumber();
                setDecimalDigits();
                SetSymbol();
            }
        }
Exemplo n.º 7
0
        void grid_CurrentCellActivated(object sender, SyncfusionRoutedEventArgs args)
        {
            GridControlBase current_cell = args.Source as GridControlBase;

            if (grid.Model[current_cell.CurrentCell.RowIndex, current_cell.CurrentCell.ColumnIndex].CellType == "MaskEdit")
            {
                g = grid.Model[current_cell.CurrentCell.RowIndex, current_cell.CurrentCell.ColumnIndex];
                SetDateSeparatorText();
                SetTimeSeparatorText();
                SetNumberDecimalSeparatorText();
                //SetNumberGroupSeparatorText();
                //SetCurrencySymbolText();
                SetPromptCharText();
                SetMaskStringText();
            }
        }
Exemplo n.º 8
0
        void grid_CurrentCellChanged(object sender, SyncfusionRoutedEventArgs args)
        {
            if (inTextChanged || inCurrentCellMoved)
            {
                return;
            }
            inCurrentCellChanged = true;
            GridControlBase grid = args.Source as GridControlBase;

            if (grid != null)
            {
                lastGridWithFocus = grid;
                GridCurrentCell cc = grid.CurrentCell;
                FormulaBox.Text = cc.Renderer.ControlText;
            }
            inCurrentCellChanged = false;
        }
Exemplo n.º 9
0
        void grid_CurrentCellActivated(object sender, SyncfusionRoutedEventArgs args)
        {
            GridControlBase current_cell = args.Source as GridControlBase;

            if (grid.Model[current_cell.CurrentCell.RowIndex, current_cell.CurrentCell.ColumnIndex].CellType == "UpDownEdit")
            {
                g = grid.Model[current_cell.CurrentCell.RowIndex, current_cell.CurrentCell.ColumnIndex];
                SetNumberGroupSeparatorText();
                SetNumberGroupSizeText();
                SetFocusedBackgroundText();
                SetNumberDecimalDigitsText();
                SetMaxValueText();
                SetMinValueText();
                SetFocusedBorderBrushText();
                SetFocusedForegroundText();
            }
        }
Exemplo n.º 10
0
        void AssociatedObject_CurrentCellActivated(object sender, SyncfusionRoutedEventArgs args)
        {
            var rowIndex    = AssociatedObject.CurrentCell.RowIndex;
            var colIndex    = AssociatedObject.CurrentCell.ColumnIndex;
            var style       = AssociatedObject.Model[rowIndex, colIndex];
            var dataContext = AssociatedObject.DataContext as ExcelLikeUiViewModel;

            if (dataContext != null && style.CellValue != null)
            {
                dataContext.FontFamily          = style.Font.FontFamily;
                dataContext.FontSize            = style.Font.FontSize;
                dataContext.FontStyle           = style.Font.FontStyle;
                dataContext.FontWeight          = style.Font.FontWeight;
                dataContext.HorizontalAlignment = style.HorizontalAlignment;
                dataContext.TextDecorations     = style.Font.TextDecorations;
                dataContext.VerticalAlignment   = style.VerticalAlignment;
            }
        }