# CustomCell class

Namespace: [Eto.Forms](https://eto.picoe.ca/api/namespace/eto.forms.md) · Assembly: [Eto](https://eto.picoe.ca/api/assembly/eto.md)

```cs
[Handler(CustomCell.IHandler)]
public class CustomCell : Cell
```

Cell for [Grid](https://eto.picoe.ca/api/type/eto.forms.grid.md) controls to create custom content for the cell.

**Remarks:** The CustomCell is useful when you want to provide a fully custom implementation of a cell, including editable controls. Note that some platforms bahave differently with a CustomCell, depending on the value of [CustomCell.SupportsControlView](https://eto.picoe.ca/api/type/eto.forms.customcell/supportscontrolview.md). When `false`, the grid will use the [CustomCell.Paint](https://eto.picoe.ca/api/type/eto.forms.customcell/paint.md) event to paint the contents of each cell, and only use [CustomCell.CreateCell](https://eto.picoe.ca/api/type/eto.forms.customcell/createcell.md) and [CustomCell.ConfigureCell](https://eto.picoe.ca/api/type/eto.forms.customcell/configurecell.md) when the cell is in edit mode. When `true`, the [CustomCell.CreateCell](https://eto.picoe.ca/api/type/eto.forms.customcell/createcell.md) and [CustomCell.ConfigureCell](https://eto.picoe.ca/api/type/eto.forms.customcell/configurecell.md) methods will be used for all cells, even when not in edit mode.

**Derived types:** [PropertyCell](https://eto.picoe.ca/api/type/eto.forms.propertycell.md)

## Properties

- [ConfigureCell](https://eto.picoe.ca/api/type/eto.forms.customcell/configurecell.md): Gets or sets a delegate to configure an cell when it is reused for a different row or the data changes.
- [CreateCell](https://eto.picoe.ca/api/type/eto.forms.customcell/createcell.md): Gets or sets a delegate to create the contents of the cell.
- [GetIdentifier](https://eto.picoe.ca/api/type/eto.forms.customcell/getidentifier.md): Gets or sets a delegate to get the identifier of the cell based on its content.
- [GetPreferredWidth](https://eto.picoe.ca/api/type/eto.forms.customcell/getpreferredwidth.md): Gets or sets a delegate to get the preferred width of the cell based on its content.
- [SupportsControlView](https://eto.picoe.ca/api/type/eto.forms.customcell/supportscontrolview.md): (static) Gets a value indicating that the CustomCell on the current platform supports using a Control for its view mode. Gtk and WinForms only support custom controls when editing a cell.

## Methods

- [Create<TControl>](https://eto.picoe.ca/api/type/eto.forms.customcell/create.md): (static) Creates a new CustomCell with instances of the specified `TControl` type.
- [GetCallback](https://eto.picoe.ca/api/type/eto.forms.customcell/getcallback.md): Gets an instance of an object used to perform callbacks to the widget from handler implementations
- [OnBeginEdit](https://eto.picoe.ca/api/type/eto.forms.customcell/onbeginedit.md): Triggers the [CustomCell.BeginEdit](https://eto.picoe.ca/api/type/eto.forms.customcell/beginedit.md) event.
- [OnCancelEdit](https://eto.picoe.ca/api/type/eto.forms.customcell/oncanceledit.md): Triggers the [CustomCell.CancelEdit](https://eto.picoe.ca/api/type/eto.forms.customcell/canceledit.md) event.
- [OnCommitEdit](https://eto.picoe.ca/api/type/eto.forms.customcell/oncommitedit.md): Triggers the [CustomCell.CommitEdit](https://eto.picoe.ca/api/type/eto.forms.customcell/commitedit.md) event.
- [OnConfigureCell](https://eto.picoe.ca/api/type/eto.forms.customcell/onconfigurecell.md): Configures an existing cell when it is reused for a different row or the data changes.
- [OnCreateCell](https://eto.picoe.ca/api/type/eto.forms.customcell/oncreatecell.md): Creates an instance of the control for a cell.
- [OnGetIdentifier](https://eto.picoe.ca/api/type/eto.forms.customcell/ongetidentifier.md): Gets the identifier of the cell based on its content.
- [OnGetPreferredWidth](https://eto.picoe.ca/api/type/eto.forms.customcell/ongetpreferredwidth.md): Gets the preferred width of the cell based on its content.
- [OnPaint](https://eto.picoe.ca/api/type/eto.forms.customcell/onpaint.md): Raises the [CustomCell.Paint](https://eto.picoe.ca/api/type/eto.forms.customcell/paint.md) event.

## Events

- [BeginEdit](https://eto.picoe.ca/api/type/eto.forms.customcell/beginedit.md): Event to handle when the cell should begin editing.
- [CancelEdit](https://eto.picoe.ca/api/type/eto.forms.customcell/canceledit.md): Event to handle when the cell should cancel editing.
- [CommitEdit](https://eto.picoe.ca/api/type/eto.forms.customcell/commitedit.md): Event to handle when the cell should commit editing.
- [Paint](https://eto.picoe.ca/api/type/eto.forms.customcell/paint.md): Event to handle painting the content of the cell when [CustomCell.SupportsControlView](https://eto.picoe.ca/api/type/eto.forms.customcell/supportscontrolview.md) is false.

## Inherited Members

- From [Widget](https://eto.picoe.ca/api/type/eto.widget.md): [ControlObject](https://eto.picoe.ca/api/type/eto.widget/controlobject.md), [Handler](https://eto.picoe.ca/api/type/eto.widget/handler.md), [ID](https://eto.picoe.ca/api/type/eto.widget/id.md), [IsDisposed](https://eto.picoe.ca/api/type/eto.widget/isdisposed.md), [NativeHandle](https://eto.picoe.ca/api/type/eto.widget/nativehandle.md), [Platform](https://eto.picoe.ca/api/type/eto.widget/platform.md), [Properties](https://eto.picoe.ca/api/type/eto.widget/properties.md), [Style](https://eto.picoe.ca/api/type/eto.widget/style.md), [StyleChanged](https://eto.picoe.ca/api/type/eto.widget/stylechanged.md), [Dispose](https://eto.picoe.ca/api/type/eto.widget/dispose.md), [Initialize](https://eto.picoe.ca/api/type/eto.widget/initialize.md), [OnStyleChanged](https://eto.picoe.ca/api/type/eto.widget/onstylechanged.md), [ToString](https://eto.picoe.ca/api/type/eto.widget/tostring.md)
