'Declaration Public Property CellEditor As CellEditor
'Usage Dim instance As ColumnBase Dim value As CellEditor instance.CellEditor = value value = instance.CellEditor
public CellEditor CellEditor {get; set;}
'Declaration Public Property CellEditor As CellEditor
'Usage Dim instance As ColumnBase Dim value As CellEditor instance.CellEditor = value value = instance.CellEditor
public CellEditor CellEditor {get; set;}
<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>
Target Platforms: Windows 11, Windows, 10, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2