WPF

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class GridCellRendererCollection

    Show / Hide Table of Contents

    Class GridCellRendererCollection

    Represents a collection of GridCellRendererBase objects in the GridControlBase view.

    Inheritance
    System.Object
    NonFinalizeDisposable
    Disposable
    GridCellRendererCollection
    Implements
    System.IDisposable
    System.Collections.ICollection
    System.Collections.IEnumerable
    Inherited Members
    NonFinalizeDisposable.Dispose()
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    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 Description
    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 Description
    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 Description
    IGridCellRenderer

    Keys

    Gets a collection of keys in the GridCellRendererCollection.

    Declaration
    public virtual ICollection Keys { get; }
    Property Value
    Type Description
    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 Description
    System.Object

    Values

    Gets a collection of values in the GridCellRendererCollection.

    Declaration
    public virtual ICollection Values { get; }
    Property Value
    Type Description
    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
    NonFinalizeDisposable.Dispose(Boolean)

    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

    Implements

    System.IDisposable
    System.Collections.ICollection
    System.Collections.IEnumerable

    Extension Methods

    FunctionalExtensions.ForEach<T>(IEnumerable, Action<T>)
    FunctionalExtensions.ToList<T>(IEnumerable)
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved