| Visual Basic (Declaration) | |
|---|---|
Public Class CellEditor Inherits DependencyObject | |
| C# | |
|---|---|
public class CellEditor : DependencyObject | |
All examples in this topic assume that the grid is bound to the Orders table of the Northwind database, unless stated otherwise.
The following examples demonstrates how to change the edit template of the cell editor for the ShipVia column to a Slider control.
| XAML | Copy Code |
|---|---|
<Grid xmlns:xcdg="http://schemas.xceed.com/wpf/xaml/datagrid"> | |
The following example demonstrates how to change the edit template of the cell editor for the Freight column to a custom calculator control. The C# code for the Calculate method called in the buttons' Click event simply calculates the new equation and is not provided. To shorten the code, some of the Button and KeyActivationGesture declarations have been removed.
| XAML | Copy Code |
|---|---|
<Grid xmlns:xcdg="http://schemas.xceed.com/wpf/xaml/datagrid"> | |
The following example demonstrates how to provide a default cell editor for columns that have an Int32 data type.
| XAML | Copy Code |
|---|---|
<Grid xmlns:xcdg="http://schemas.xceed.com/wpf/xaml/datagrid" | |
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.
System.Object
System.Windows.Threading.DispatcherObject
System.Windows.DependencyObject
Xceed.Wpf.DataGrid.CellEditor
Supported Operating Systems: Windows Server 2003 Service Pack 1; Windows Vista; Windows XP Service Pack 2
Reference
CellEditor MembersXceed.Wpf.DataGrid Namespace
Properties
CellEditor Property (Column Class)DefaultCellEditors Property (DataGridControl Class)


~288.gif)


Copy Code