public override FrameworkElement GetCellEditingContent(C1.WPF.DataGrid.DataGridRow row) { var numeric = (C1NumericBox)base.GetCellEditingContent(row); numeric.HandleUpDownKeys = false; return(numeric); }
public override void UnbindCellContent(FrameworkElement cellContent, C1.WPF.DataGrid.DataGridRow row) { Panel panel = (Panel)cellContent; // bind individual cells for (int i = 0; i < InnerColumns.Count; i++) { var col = InnerColumns[i]; var control = panel.Children[i] as FrameworkElement; col.UnbindCellContent(control, row); } }
public override FrameworkElement GetCellEditingContent(C1.WPF.DataGrid.DataGridRow row) { // initialize grid var panel = new Grid(); foreach (var col in InnerColumns) { panel.ColumnDefinitions.Add(new ColumnDefinition() { Width = new GridLength(col.Width.Value) }); } // add individual content for (int i = 0; i < InnerColumns.Count; i++) { var col = InnerColumns[i]; var content = col.GetCellEditingContent(row); Grid.SetColumn(content, i); panel.Children.Add(content); } return(panel); }
public override object GetCellContentRecyclingKey(C1.WPF.DataGrid.DataGridRow row) { return(typeof(CompositeColumn)); }
public override void BindCellContent(System.Windows.FrameworkElement cellContent, C1.WPF.DataGrid.DataGridRow row) { var maskedTextBox = (C1MaskedTextBox)cellContent; if (Binding == null) { maskedTextBox.ClearValue(C1MaskedTextBox.ValueProperty); return; } maskedTextBox.Mask = Mask; maskedTextBox.TextMaskFormat = TextMaskFormat; maskedTextBox.PromptChar = ' '; maskedTextBox.TextWrapping = TextWrapping; maskedTextBox.HorizontalAlignment = base.HorizontalAlignment; maskedTextBox.VerticalAlignment = base.VerticalAlignment; maskedTextBox.BorderBrush = null; maskedTextBox.Background = Brushes.Transparent; if (FlowDirection != null) { maskedTextBox.FlowDirection = (FlowDirection)FlowDirection; } if (Binding != null) { Binding newBinding = CopyBinding(Binding); newBinding.Source = row.DataItem; newBinding.Mode = BindingMode.OneWay; maskedTextBox.SetBinding(C1MaskedTextBox.ValueProperty, newBinding); } }
public override System.Windows.FrameworkElement CreateCellContent(C1.WPF.DataGrid.DataGridRow row) { return(new C1MaskedTextBox()); }
public override object GetCellContentRecyclingKey(C1.WPF.DataGrid.DataGridRow row) { return(typeof(C1MaskedTextBox)); }
private static void UpdateRowVisibility(C1.WPF.DataGrid.DataGridRow row, Task task) { row.Visibility = task.IsVisible ? Visibility.Visible : Visibility.Collapsed; }
public override object GetCellContentRecyclingKey(C1.WPF.DataGrid.DataGridRow row) { return(typeof(DataGridValueLablesCol)); }