Class GridCellRendererCollection
Represents a collection of GridCellRendererBase objects in the GridControlBase view.
Implements
Namespace: Syncfusion.Windows.Controls.Grid
Assembly: Syncfusion.Grid.Wpf.dll
Syntax
public class GridCellRendererCollection : Disposable, IDisposable, ICollection, IEnumerable
Remarks
On the GridControlBase, you access the GridCellRendererCollection through the CellRenderers property.
The GridCellRendererCollection uses standard Add(String, IGridCellRenderer) and Remove(String) methods to manipulate the collection. Use the Contains method to determine if a specific cell type exists in the collection.
Examples
The following example shows how to retrieve the checkbox cell renderer from this collection.
GridCellCheckboxRenderer rend = (GridCellCheckboxRenderer)gridControl1.CellRenderers["CheckBox"];
Constructors
GridCellRendererCollection(GridControlBase)
Initializes a GridCellRendererCollection and associates it with the GridControlBase.
Declaration
public GridCellRendererCollection(GridControlBase grid)
Parameters
Type | Name | Description |
---|---|---|
GridControlBase | grid | The parent grid. |
Properties
Count
Gets the number of key-and-value pairs in the GridCellRendererCollection.
Declaration
public virtual int Count { get; }
Property Value
Type |
---|
System.Int32 |
IsSynchronized
Gets a value that indicates whether access to the GridCellRendererCollection is synchronized (thread-safe).
Declaration
public virtual bool IsSynchronized { get; }
Property Value
Type |
---|
System.Boolean |
Item[String]
The GridCellRendererBase for the given key.
Declaration
public virtual IGridCellRenderer this[string key] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
System.String | key |
Property Value
Type |
---|
IGridCellRenderer |
Keys
Gets a collection of keys in the GridCellRendererCollection.
Declaration
public virtual ICollection Keys { get; }
Property Value
Type |
---|
System.Collections.ICollection |
SyncRoot
Gets an object that can be used to synchronize access to the GridCellRendererCollection.
Declaration
public virtual object SyncRoot { get; }
Property Value
Type |
---|
System.Object |
Values
Gets a collection of values in the GridCellRendererCollection.
Declaration
public virtual ICollection Values { get; }
Property Value
Type |
---|
System.Collections.ICollection |
Methods
Add(String, IGridCellRenderer)
Adds cell grid with the specified key into the GridCellRendererCollection.
Declaration
public virtual void Add(string key, IGridCellRenderer grid)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key of the entry to add. |
IGridCellRenderer | grid | The cell grid of the entry to add. |
Clear()
Removes all entries from the GridCellRendererCollection.
Declaration
public virtual void Clear()
ContainsKey(String)
Determines if the GridCellRendererCollection contains a specific key.
Declaration
public virtual bool ContainsKey(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key to locate in the GridCellRendererCollection. |
Returns
Type | Description |
---|---|
System.Boolean | true if the GridCellRendererCollection contains an entry with the specified key; otherwise, false. |
ContainsValue(GridCellRendererBase)
Determines if the GridCellRendererCollection contains a specific value.
Declaration
public virtual bool ContainsValue(GridCellRendererBase cellRenderer)
Parameters
Type | Name | Description |
---|---|---|
GridCellRendererBase | cellRenderer | The value to locate in the GridCellRendererCollection. |
Returns
Type | Description |
---|---|
System.Boolean | true if the GridCellRendererCollection contains an element with the specified value; otherwise, false. |
CopyTo(GridCellRendererBase[], Int32)
Copies the cell grid dictionary values to a one-dimensional System.Array instance at the specified index.
Declaration
public virtual void CopyTo(GridCellRendererBase[] array, int index)
Parameters
Type | Name | Description |
---|---|---|
GridCellRendererBase[] | array | The one-dimensional System.Array that is the destination of the values copied from the GridCellRendererCollection. |
System.Int32 | index |
Dispose(Boolean)
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing |
Overrides
GetEnumerator()
Returns an enumerator that can iterate through the cell grid dictionary.
Declaration
public virtual IEnumerator GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.IEnumerator | An System.Collections.IEnumerator that can iterate through the string dictionary. |
Remove(String)
Removes the entry with the specified key from the cell grid dictionary.
Declaration
public virtual void Remove(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key of the entry to remove. |