Class
GridViewItemContainerGenerator

An GridViewItemContainerGenerator is responsible for generating the UI on behalf of its host (e.g. BaseItemsControl). It maintains the association between the items in the control's data view and the corresponding UIElements. The control's item-host can ask the GridViewItemContainerGenerator for a Generator, which does the actual generation of UI.

Definition

Namespace:Telerik.Windows.Controls.GridView

Assembly:Telerik.Windows.Controls.GridView.dll

Syntax:

cs-api-definition
public sealed class GridViewItemContainerGenerator : IRecyclingItemContainerGenerator, IItemContainerGenerator, IContainerGenerator, IDisposable, IWeakEventListener

Inheritance: objectGridViewItemContainerGenerator

Implements: IContainerGeneratorIDisposableIItemContainerGeneratorIRecyclingItemContainerGeneratorIWeakEventListener

Methods

ContainerFromIndex(int)

Return the UI element corresponding to the item at the given index within the ItemCollection.

Declaration

cs-api-definition
public DependencyObject ContainerFromIndex(int index)

Parameters

index

int

Returns

DependencyObject

Implements IContainerGenerator.ContainerFromIndex(int)

ContainerFromItem(object)

Return the UI element corresponding to the given item. Returns null if the item does not belong to the item collection, or if no UI has been generated for it.

Declaration

cs-api-definition
public DependencyObject ContainerFromItem(object item)

Parameters

item

object

Returns

DependencyObject

Implements IContainerGenerator.ContainerFromItem(object)

Dispose()

IDisposable.

Declaration

cs-api-definition
public void Dispose()

Implements IDisposable.Dispose()

IndexFromContainer(DependencyObject)

Given a generated UI element, return the index of the corresponding item within the ItemCollection.

Declaration

cs-api-definition
public int IndexFromContainer(DependencyObject container)

Parameters

container

DependencyObject

Returns

int

Implements IContainerGenerator.IndexFromContainer(DependencyObject)

ItemFromContainer(DependencyObject)

Return the item corresponding to the given UI element. If the element was not generated as a container for this generator's host, the method returns DependencyProperty.UnsetValue.

Declaration

cs-api-definition
public object ItemFromContainer(DependencyObject container)

Parameters

container

DependencyObject

Returns

object

Implements IContainerGenerator.ItemFromContainer(DependencyObject)

Events

ItemsChanged

The ItemsChanged event is raised by a GridViewItemContainerGenerator to inform layouts that the items collection has changed.

Declaration

cs-api-definition
public event ItemsChangedEventHandler ItemsChanged

Event Value

ItemsChangedEventHandler

StatusChanged

The StatusChanged event is raised by a GridViewItemContainerGenerator to inform controls that its status has changed.

Declaration

cs-api-definition
public event EventHandler StatusChanged

Event Value

EventHandler