

'Declaration<TypeDescriptionProviderAttribute(MS.Internal.ComponentModel.DependencyObjectProvider)> <NameScopePropertyAttribute("NameScope", System.Windows.NameScope)> Public Class CellEditor Inherits System.Windows.Freezable
'UsageDim instance As CellEditor
[TypeDescriptionProvider(MS.Internal.ComponentModel.DependencyObjectProvider)] [NameScopeProperty("NameScope", System.Windows.NameScope)] public class CellEditor : System.Windows.Freezable
The data template that will be used to edit the content of a cell is specified through the EditTemplate property while the activation gestures that are supported by the CellEditor are contained in the ActivationGestures collection.
Custom cell editors can be provided per column by setting a column's CellEditor property, or per data type through the DataGridControl.DefaultCellEditors property.
<Grid xmlns:xcdg="http://schemas.xceed.com/wpf/xaml/datagrid"> <Grid.Resources> <xcdg:DataGridCollectionViewSource x:Key="cvs_orders" Source="{Binding Source={x:Static Application.Current}, Path=Orders}"/> </Grid.Resources> <xcdg:DataGridControl x:Name="OrdersGrid" ItemsSource="{Binding Source={StaticResource cvs_orders}}"> <xcdg:DataGridControl.Columns> <xcdg:Column FieldName="ShipVia"> <xcdg:Column.CellEditor> <xcdg:CellEditor> <xcdg:CellEditor.EditTemplate> <DataTemplate> <Slider Value="{xcdg:CellEditorBinding}" Minimum="1" Maximum="3"/> </DataTemplate> </xcdg:CellEditor.EditTemplate> <xcdg:CellEditor.ActivationGestures> <xcdg:KeyActivationGesture Key="Right"/> <xcdg:KeyActivationGesture Key="Left"/> </xcdg:CellEditor.ActivationGestures> </xcdg:CellEditor> </xcdg:Column.CellEditor> </xcdg:Column> </xcdg:DataGridControl.Columns> </xcdg:DataGridControl> </Grid>
<Grid xmlns:xcdg="http://schemas.xceed.com/wpf/xaml/datagrid"> <Grid.Resources> <xcdg:DataGridCollectionViewSource x:Key="cvs_orders" Source="{Binding Source={x:Static Application.Current}, Path=Orders}"/> </Grid.Resources> <xcdg:DataGridControl x:Name="OrdersGrid" ItemsSource="{Binding Source={StaticResource cvs_orders}}"> <xcdg:DataGridControl.Columns> <xcdg:Column FieldName="Freight"> <xcdg:Column.CellEditor> <xcdg:CellEditor> <xcdg:CellEditor.EditTemplate> <DataTemplate> <DockPanel> <TextBlock x:Name="actual_value" Text="{xcdg:CellEditorBinding}" DockPanel.Dock="Top"/> <UniformGrid Columns="4" x:Name="parentPanel" Tag="{Binding ElementName=actual_value, Path=Text, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Button.Click="Calculate" DockPanel.Dock="Top"> <Button x:Name="seven" Content="7"/> <!-- ... --> <Button x:Name="addition" Content="+"/> </UniformGrid> <TextBlock x:Name="current_equation" DockPanel.Dock="Bottom"/> </DockPanel> </DataTemplate> </xcdg:CellEditor.EditTemplate> <xcdg:CellEditor.ActivationGestures> <xcdg:KeyActivationGesture Key="NumPad0"/> <!-- ... --> <xcdg:KeyActivationGesture Key="NumPad9"/> </xcdg:CellEditor.ActivationGestures> </xcdg:CellEditor> </xcdg:Column.CellEditor> </xcdg:Column> </xcdg:DataGridControl.Columns> </xcdg:DataGridControl> </Grid>
<Grid xmlns:xcdg="http://schemas.xceed.com/wpf/xaml/datagrid" xmlns:s="clr-namespace:System;assembly=mscorlib"> <Grid.Resources> <xcdg:DataGridCollectionViewSource x:Key="cvs_orders" Source="{Binding Source={x:Static Application.Current}, Path=Orders}"/> </Grid.Resources> <xcdg:DataGridControl x:Name="OrdersGrid" ItemsSource="{Binding Source={StaticResource cvs_orders}}"> <xcdg:DataGridControl.DefaultCellEditors> <xcdg:CellEditor x:Key="{x:Type s:Int32}"> <xcdg:CellEditor.EditTemplate> <DataTemplate> <Slider Value="{xcdg:CellEditorBinding}"/> </DataTemplate> </xcdg:CellEditor.EditTemplate> </xcdg:CellEditor> </xcdg:DataGridControl.DefaultCellEditors> </xcdg:DataGridControl> </Grid>
System.Object
System.Windows.Threading.DispatcherObject
System.Windows.DependencyObject
System.Windows.Freezable
Xceed.Wpf.DataGrid.CellEditor
| Name | Description | |
|---|---|---|
![]() | CellEditor Constructor | Initializes a new instance of the CellEditor class. |
| Name | Description | |
|---|---|---|
![]() ![]() | ActivationGesturesProperty | Identifies the ActivationGestures dependency property. |
![]() ![]() | EditTemplateProperty | Identifies the EditTemplate dependency property. |
![]() ![]() | HasErrorProperty | Identifies the HasError attached property. |
| Name | Description | |
|---|---|---|
![]() | ActivationGestures | Retrieves a collection of the activation gestures supported by the cell editor. |
![]() | CanFreeze | (Inherited from System.Windows.Freezable) |
![]() ![]() | CheckBoxEditor | Gets a static instance of a CheckBox control that will be used by default for Cells that have boolean content. |
![]() ![]() | DatePickerEditor | Gets a static instance of a DatePicker control that will be used by default for Cells that have date-time content. |
![]() | DependencyObjectType | (Inherited from System.Windows.DependencyObject) |
![]() | Dispatcher | (Inherited from System.Windows.Threading.DispatcherObject) |
![]() | EditTemplate | Gets or sets the data template that will be used to edit the content of a cell. |
![]() | IsFrozen | (Inherited from System.Windows.Freezable) |
![]() | IsSealed | (Inherited from System.Windows.DependencyObject) |
![]() ![]() | TextBoxEditor | Gets a static instance of a AutoSelectTextBox control that will be used by default for Cells with text content. |
| Name | Description | |
|---|---|---|
![]() | CloneCore | (Inherited from System.Windows.Freezable) |
![]() | CloneCurrentValueCore | (Inherited from System.Windows.Freezable) |
![]() | CreateInstance | (Inherited from System.Windows.Freezable) |
![]() | CreateInstanceCore | Overridden. Creates a new instance of the CellEditor class. |
![]() | FreezeCore | (Inherited from System.Windows.Freezable) |
![]() | GetAsFrozenCore | (Inherited from System.Windows.Freezable) |
![]() | GetCurrentValueAsFrozenCore | (Inherited from System.Windows.Freezable) |
![]() | OnChanged | (Inherited from System.Windows.Freezable) |
![]() | OnFreezablePropertyChanged | Overloaded. (Inherited from System.Windows.Freezable) |
![]() | OnPropertyChanged | (Inherited from System.Windows.Freezable) |
![]() | ReadPreamble | (Inherited from System.Windows.Freezable) |
![]() | ShouldSerializeProperty | (Inherited from System.Windows.DependencyObject) |
![]() | WritePostscript | (Inherited from System.Windows.Freezable) |
![]() | WritePreamble | (Inherited from System.Windows.Freezable) |
| Name | Description | |
|---|---|---|
![]() | FindLogicalAncestor<T> | Finds the logical ancenster |
![]() | FindLogicalAncestorsAndSelf | |
![]() | FindLogicalChildren<T> | Find the logical children. |
![]() | FindVisualAncestor<T> | Finds the visual ancestor. |
![]() | FindVisualChildren<T> | Finds the visual children. |
![]() | FindVisualTreeRoot | Finds the visual tree root. |
![]() | ShowDialog | Overloaded. |
| Name | Description | |
|---|---|---|
![]() | Changed | (Inherited from System.Windows.Freezable) |
.NET: net5.0, net5.0-windows, net6.0, net6.0-macos, net6.0-windows, net7.0, net7.0-macos, net7.0-windows, net8.0, net8.0-browser, net8.0-macos, net8.0-windows, net9.0, net9.0-browser, net9.0-macos, net9.0-windows, net10.0, net10.0-browser, net10.0-macos, net10.0-windows.
.NET Framework: net40, net403, net45, net451, net452, net46, net461, net462, net463, net47, net471, net472, net48, net481.
CellEditor Members
Xceed.Wpf.DataGrid Namespace
CellEditor Property (Column Class)
DefaultCellEditors Property (DataGridControl Class)