ComponentOne DataGrid for WPF and Silverlight
GetCellContentRecyclingKey Method (DataGridColumn)

C1.WPF.DataGrid Namespace > DataGridColumn Class : GetCellContentRecyclingKey Method
This parameter can be used to have different cell content depending on the row. In most cases this parameter won't be used.
Key used to store the cell content for future reuse in a shared pool.
Syntax
'Declaration
 
Public MustOverride Function GetCellContentRecyclingKey( _
   ByVal row As DataGridRow _
) As System.Object
public abstract System.object GetCellContentRecyclingKey( 
   DataGridRow row
)

Parameters

row
This parameter can be used to have different cell content depending on the row. In most cases this parameter won't be used.

Return Value

The recycling key, or null to disable recycling.
Remarks

Columns returning the same RecyclingKey will be candidate to share the same cells content instances.

Typically this method returns the type of the element returned by the method CreateCellContent.

Cell content lifecycle.

  1. If there is no recycled cell content matching the recycling key, the method CreateCellContent will be called to create a new one.
  2. Once the cell content is created or a recycled one is taken, the method BindCellContent will be called.
  3. When the cell content is not being used the method UnbindCellContent will be called, and the cell content will be saved for future use in other cells.

Example

return typeof(TextBlock);

See Also

Reference

DataGridColumn Class
DataGridColumn Members
CreateCellContent
BindCellContent
UnbindCellContent