private void OnItemsSourceChanged(SyncfusionRoutedEventArgs args) { GridDataControl grid = args.Source as GridDataControl; if (grid.GroupedColumns.Count > 0) { grid.Model.Table.ExpandAllGroupsAtLevel(1); } }
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(); } }
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(); } }
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; } } }
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(); } }
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(); } }
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; }
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(); } }
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; } }