Class GridCellRendererCollection
Represents a collection of GridCellRendererBase objects in the GridControlBase view.
Implements
Inherited Members
Namespace: Syncfusion.Windows.Forms.Grid
Assembly: Syncfusion.Grid.Windows.dll
Syntax
public class GridCellRendererCollection : GridSubComponent, IDisposable, ICollection, IEnumerable
Remarks
On the GridControlBase, you access the GridCellRendererCollection through the CellRenderers property.
The GridCellRendererCollection uses standard Add(String, GridCellRendererBase) and Remove(String) methods to manipulate the collection. Use the Contains method to determine if a specific cell type exists in the collection.
Constructors
GridCellRendererCollection(GridControlBase)
Initializes a new instance of the GridCellRendererCollection class and associates it with the GridControlBase.
Declaration
public GridCellRendererCollection(GridControlBase grid)
Parameters
Type | Name | Description |
---|---|---|
GridControlBase | grid | The GridControlBase object holds the grid control. |
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 indicating whether access to the GridCellRendererCollection is synchronized (thread-safe).
Declaration
public virtual bool IsSynchronized { get; }
Property Value
Type |
---|
System.Boolean |
Item[String]
Gets or Sets the GridCellRendererBase for the given key.
Declaration
public virtual GridCellRendererBase this[string key] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
System.String | key |
Property Value
Type |
---|
GridCellRendererBase |
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, GridCellRendererBase)
Adds cell grid with the specified key into the GridCellRendererCollection.
Declaration
public virtual void Add(string key, GridCellRendererBase grid)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key of the entry to add. |
GridCellRendererBase | 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 | The index in the array where copying begins. |
Dispose(Boolean)
Disposes the unmanaged resources.
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing | True to release both managed and unmanaged resources; false to release only unmanaged resources. |
Overrides
Remarks
See the documentation for the
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. |
Explicit Interface Implementations
ICollection.CopyTo(Array, Int32)
Declaration
void ICollection.CopyTo(Array array, int index)
Parameters
Type | Name | Description |
---|---|---|
System.Array | array | |
System.Int32 | index |