menu

Xamarin.Forms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class GridCellRendererCollection - Xamarin.Forms API Reference | Syncfusion

    Show / Hide Table of Contents

    Class GridCellRendererCollection

    Represents a collection of GridCellRendererBase objects in the view.

    Inheritance
    System.Object
    Syncfusion.GridCommon.ComponentModel.NonFinalizeDisposable
    Syncfusion.GridCommon.ComponentModel.Disposable
    GridCellRendererCollection
    Implements
    System.IDisposable
    System.Collections.ICollection
    System.Collections.IEnumerable
    Namespace: Syncfusion.SfDataGrid.XForms
    Assembly: Syncfusion.SfDataGrid.XForms.dll
    Syntax
    public class GridCellRendererCollection : Disposable, IDisposable, ICollection, IEnumerable
    Remarks

    In a SfDataGrid control, you can access the GridCellRendererCollection through the CellRenderers property.

    The GridCellRendererCollection uses standard Add(String, IGridCellRenderer) and Remove(String) methods to manipulate the collection. Uses the Contains method to determine if a specific cell type exists in the collection.

    Constructors

    GridCellRendererCollection(SfDataGrid)

    Initializes a new instance of the GridCellRendererCollection class.

    Declaration
    public GridCellRendererCollection(SfDataGrid grid)
    Parameters
    Type Name Description
    SfDataGrid grid

    The reference of the SfDataGrid.

    Properties

    Count

    Gets the number of elements contained in the System.Collections.ICollection.

    Declaration
    public int Count { get; }
    Property Value
    Type Description
    System.Int32

    The number of elements contained in the System.Collections.ICollection.

    IsSynchronized

    Gets a value indicating whether access to the System.Collections.ICollection is synchronized (thread safe).

    Declaration
    public bool IsSynchronized { get; }
    Property Value
    Type Description
    System.Boolean

    True if access to the System.Collections.ICollection is synchronized (thread safe); otherwise, false.

    Item[String]

    Indexer will return the corresponding renderer for the given key value.

    Declaration
    public IGridCellRenderer this[string key] { get; set; }
    Parameters
    Type Name Description
    System.String key

    The key for which the renderer should be obtained.

    Property Value
    Type Description
    IGridCellRenderer

    The corresponding renderer for the given key value.

    Keys

    Gets the keys of the renderers in the collection.

    Declaration
    public ICollection Keys { get; }
    Property Value
    Type Description
    System.Collections.ICollection

    The keys of the renderers in the collection.

    SyncRoot

    Gets an object that can be used to synchronize access to the System.Collections.ICollection.

    Declaration
    public object SyncRoot { get; }
    Property Value
    Type Description
    System.Object

    An object that can be used to synchronize access to the System.Collections.ICollection.

    Values

    Gets the renderers in the collection.

    Declaration
    public ICollection Values { get; }
    Property Value
    Type Description
    System.Collections.ICollection

    The renderers in the collection.

    Methods

    Add(String, IGridCellRenderer)

    Adds the given renderer to the Renderer dictionary.

    Declaration
    public void Add(string key, IGridCellRenderer renderer)
    Parameters
    Type Name Description
    System.String key

    The key of the renderer.

    IGridCellRenderer renderer

    The renderer which should be added to the collection.

    Clear()

    Clear the values in the renderer dictionary.

    Declaration
    public void Clear()

    ContainsKey(String)

    Checks whether the renderer dictionary contains the corresponding renderer key.

    Declaration
    public bool ContainsKey(string key)
    Parameters
    Type Name Description
    System.String key

    The key which should be queried in the renderer collection.

    Returns
    Type Description
    System.Boolean

    Returns true if the Key is found in the Dictionary, otherwise false.

    ContainsValue(GridCellRendererBase)

    Checks whether the renderer dictionary contains the corresponding renderer.

    Declaration
    public bool ContainsValue(GridCellRendererBase cellRenderer)
    Parameters
    Type Name Description
    GridCellRendererBase cellRenderer

    The cell renderer which should be queried in the renderer collection.

    Returns
    Type Description
    System.Boolean

    Returns true if the renderer is found in the Dictionary, otherwise false.

    CopyTo(GridCellRendererBase[], Int32)

    Copies the renderer values to the array.

    Declaration
    public void CopyTo(GridCellRendererBase[] array, int index)
    Parameters
    Type Name Description
    GridCellRendererBase[] array

    An array of cell renderer.

    System.Int32 index

    The zero-based index in array at which copying begins.

    CopyTo(Array, Int32)

    Copies the elements of the System.Collections.ICollection to an System.Array, starting at a given System.Array index.

    Declaration
    public void CopyTo(Array array, int index)
    Parameters
    Type Name Description
    System.Array array

    The one-dimensional System.Array that is the destination of the elements copied from System.Collections.ICollection. The System.Array must have zero-based indexing.

    System.Int32 index

    The zero-based index in array at which copying begins.

    Exceptions
    Type Condition
    System.ArgumentException

    array is multidimensional.-or- The number of elements in the source System.Collections.ICollection is greater than the available space from index to the end of the destination array.-or-The type of the source System.Collections.ICollection cannot be cast automatically to the type of the destination array.

    System.ArgumentOutOfRangeException

    index is less than zero.

    System.ArgumentNullException

    array is null.

    Dispose(Boolean)

    Releases the unmanaged resources used by the component and optionally releases the managed resources.

    Declaration
    protected override void Dispose(bool disposing)
    Parameters
    Type Name Description
    System.Boolean disposing

    The value indicating whether both managed and unmanaged resources should be released. if true - release both managed and unmanaged resources; if false - release only unmanaged resources.

    Overrides
    Syncfusion.GridCommon.ComponentModel.NonFinalizeDisposable.Dispose(System.Boolean)

    GetEnumerator()

    Returns the enumerator for retrieving the values in the cell renderer collection.

    Declaration
    public IEnumerator GetEnumerator()
    Returns
    Type Description
    System.Collections.IEnumerator

    The enumerator for retrieving the values in the cell renderer collection.

    Remove(String)

    Removes the renderer with the given key value from the dictionary.

    Declaration
    public void Remove(string key)
    Parameters
    Type Name Description
    System.String key

    The key whose renderer should be removed.

    Implements

    System.IDisposable
    System.Collections.ICollection
    System.Collections.IEnumerable
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved