menu

Xamarin.Android

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Interface IGridCellRenderer - Xamarin.Android API Reference | Syncfusion

    Show / Hide Table of Contents

    Interface IGridCellRenderer

    Defines the interface for all cell renderer. A default implementation of this interface is provided by the GridCellRendererBase class from which you should derive custom cell renderer classes. There is however no dependency on GridCellRendererBase. We should access the renderer by using this interface only. Do not create any objects for renderer.

    Namespace: Syncfusion.SfDataGrid
    Assembly: Syncfusion.SfDataGrid.Android.dll
    Syntax
    public interface IGridCellRenderer : IDisposable

    Properties

    Context

    Gets the context of the SfDataGrid.

    Declaration
    Context Context { get; }
    Property Value
    Type Description
    Android.Content.Context

    The context of the SfDataGrid.

    DataGrid

    Gets or sets the reference of the SfDataGrid control.

    Declaration
    SfDataGrid DataGrid { get; set; }
    Property Value
    Type Description
    SfDataGrid

    The reference of the SfDataGrid control.

    HasCurrentCellState

    Gets a value indicating whether the cell state for the current cell has been set.

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

    True if the cell state for the current cell is set, otherwise false.

    IsEditable

    Gets or sets a value indicating whether the cell is editable or not.

    Declaration
    bool IsEditable { get; set; }
    Property Value
    Type Description
    System.Boolean

    True if the current cell is editable, otherwise false.

    IsFocusable

    Gets or sets a value indicating whether a grid cell is focusable or not.

    Declaration
    bool IsFocusable { get; set; }
    Property Value
    Type Description
    System.Boolean

    True the current cell is focusable, otherwise false.

    Methods

    BeginEdit(RowColumnIndex, CellElement, GridColumn, Object)

    This method fires when editing in the current cell begins.

    Declaration
    bool BeginEdit(RowColumnIndex rowColumnIndex, CellElement cellElement, GridColumn column, object rowData)
    Parameters
    Type Name Description
    RowColumnIndex rowColumnIndex

    The row column index of the cell which is in edit mode.

    CellElement cellElement

    The UIElement of the cell which is in edit mode.

    GridColumn column

    The corresponding grid column of the cell which is in edit mode.

    System.Object rowData

    The corresponding record of the row which is in edit mode.

    Returns
    Type Description
    System.Boolean

    Returns a value indicating whether the cell enters into the editing mode or not.

    CanUpdateBinding(DataColumnBase)

    Determines whether the binding for the column can be updated. Implement this method to update binding on particular renderer when the data context is set.

    Declaration
    bool CanUpdateBinding(DataColumnBase dataColumnBase)
    Parameters
    Type Name Description
    Syncfusion.SfDataGrid.DataColumnBase dataColumnBase

    The corresponding column for which the binding update should be determined.

    Returns
    Type Description
    System.Boolean

    True if the binding is updated for the column, otherwise false.

    ClearRecycleBin()

    Clears the recycle bin. The cell element will be stored for recycling purpose, when the cell element is scrolled out of view. This method clears all the cell elements which are stored for recycling purpose.

    Declaration
    void ClearRecycleBin()

    CommitCellValue(Boolean)

    Commits the edited value to the underlying data.

    Declaration
    void CommitCellValue(bool isNewValue)
    Parameters
    Type Name Description
    System.Boolean isNewValue

    A value indicating whether the edited value is new value.

    EndEdit(DataColumnBase, Object)

    This method fires when the editing in the current cell is ended.

    Declaration
    bool EndEdit(DataColumnBase dataColumn, object record)
    Parameters
    Type Name Description
    Syncfusion.SfDataGrid.DataColumnBase dataColumn

    The corresponding data column of the cell, which leaves the edit mode.

    System.Object record

    The underlying data of the cell, which leaves the edit mode.

    Returns
    Type Description
    System.Boolean

    A boolean value indicating whether the current cell has focus.

    GetControlValue()

    Returns the current cell value, only if the renderer's HasCurrentCellState is true.

    Declaration
    object GetControlValue()
    Returns
    Type Description
    System.Object

    The current cell value.

    Layout(RowColumnIndex, View, Int32, Int32, Int32, Int32)

    Renderer will arrange the views using this method.

    Declaration
    void Layout(RowColumnIndex rowColumnIndex, View view, int left, int top, int right, int bottom)
    Parameters
    Type Name Description
    RowColumnIndex rowColumnIndex

    The row column index of the cell.

    Android.Views.View view

    The corresponding UIElement of the cell.

    System.Int32 left

    The left end of the cell for arranging the view.

    System.Int32 top

    The top end of the cell for arranging the view.

    System.Int32 right

    The right end of the cell for arranging the view.

    System.Int32 bottom

    The bottom end of the cell for arranging the view.

    Measure(RowColumnIndex, View, Int32, Int32)

    Method which is used by the renderer to measure the cell views.

    Declaration
    void Measure(RowColumnIndex rowColumnIndex, View view, int widthMeasureSpec, int heightMeasureSpec)
    Parameters
    Type Name Description
    RowColumnIndex rowColumnIndex

    The row column index of the cell.

    Android.Views.View view

    The corresponding view of the cell.

    System.Int32 widthMeasureSpec

    Corresponding width for measuring the view size.

    System.Int32 heightMeasureSpec

    Corresponding height for measuring the view size.

    PrepareViews(DataColumnBase)

    Method which is used to create and initiate the view for cell.

    Declaration
    CellElement PrepareViews(DataColumnBase dataColumn)
    Parameters
    Type Name Description
    Syncfusion.SfDataGrid.DataColumnBase dataColumn

    The dataColumn containing the details of the column.

    Returns
    Type Description
    CellElement

    Returns the columnElement of the cell

    RefreshDisplayValue(DataColumnBase)

    Method which is used to refresh the display value of the cell.

    Declaration
    void RefreshDisplayValue(DataColumnBase dataColumn)
    Parameters
    Type Name Description
    Syncfusion.SfDataGrid.DataColumnBase dataColumn

    The dataColumn containing the details of the column.

    ResetCurrentCellState()

    Resets the current cell information in renderer, when the current cell is deactivated.

    Declaration
    void ResetCurrentCellState()

    SetControlValue(Object)

    Set the current cell value, only if the renderer's HasCurrentCellState is true.

    Declaration
    void SetControlValue(object value)
    Parameters
    Type Name Description
    System.Object value

    The value to be set to the current cell.

    SetCurrentCellState(RowColumnIndex, CellElement, Boolean)

    Update the current cell information in the renderer while current cell was activated.

    Declaration
    void SetCurrentCellState(RowColumnIndex currentCellIndex, CellElement currentCellElement, bool isInEditing)
    Parameters
    Type Name Description
    RowColumnIndex currentCellIndex

    The row column index of the current cell.

    CellElement currentCellElement

    The UIElement of the current cell.

    System.Boolean isInEditing

    The value indicating whether the view is in edit mode or not.

    SetFocus(Boolean)

    Sets the focus to the current cell renderer element.

    Declaration
    void SetFocus(bool setFocus)
    Parameters
    Type Name Description
    System.Boolean setFocus

    The value indicating whether the current cell renderer element is focusable or not.

    UnloadViews(DataColumnBase)

    Method which is used for unloading the view of the cell.(For Recycling Purpose)

    Declaration
    void UnloadViews(DataColumnBase dataColumn)
    Parameters
    Type Name Description
    Syncfusion.SfDataGrid.DataColumnBase dataColumn

    The dataColumn containing the details of the column.

    UpdateCellStyle(DataColumnBase)

    Method used to update the cell style.

    Declaration
    void UpdateCellStyle(DataColumnBase dataColumn)
    Parameters
    Type Name Description
    Syncfusion.SfDataGrid.DataColumnBase dataColumn

    The dataColumn containing the details of the column.

    UpdateCellValue(DataColumnBase)

    Method which is used to update the cell value.

    Declaration
    void UpdateCellValue(DataColumnBase dataColumn)
    Parameters
    Type Name Description
    Syncfusion.SfDataGrid.DataColumnBase dataColumn

    The dataColumn containing the details of the column.

    UpdateColumnInfo(DataColumnBase)

    Method which is used to update the binding information of the cell UIElement.

    Declaration
    void UpdateColumnInfo(DataColumnBase dataColumn)
    Parameters
    Type Name Description
    Syncfusion.SfDataGrid.DataColumnBase dataColumn

    The dataColumn containing the details of the column.

    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved