menu

Xamarin.Android

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

    Show / Hide Table of Contents

    Class GridHeaderCellControl

    Represents a header cell in a SfDataGrid control.

    Inheritance
    System.Object
    CellElement
    GridHeaderCellControl
    Implements
    Android.Views.View.IOnClickListener
    Android.Runtime.IJavaObject
    System.IDisposable
    Java.Interop.IJavaPeerable
    Android.Views.View.IOnLongClickListener
    Inherited Members
    CellElement.CalculateLeftAndRightPadding(GravityFlags, TextView, String, Int32, Thickness, Int32, Int32, LineBreakMode)
    CellElement.CalculateTopAndBottomPadding(GravityFlags, TextView, String, Int32, Thickness, Int32, Int32, Paint, LineBreakMode, Double)
    CellElement.CanRendererUnload
    CellElement.CanRenderUnLoad
    CellElement.GetAutoHeight(Object)
    CellElement.GetAutoWidth(Object)
    CellElement.GetHorizontalAlignment(GravityFlags, GravityFlags, Boolean)
    CellElement.GetVerticalAlignment(GravityFlags, GravityFlags)
    CellElement.Load()
    CellElement.OnCellValueChanged()
    CellElement.UnLoad()
    Namespace: Syncfusion.SfDataGrid
    Assembly: Syncfusion.SfDataGrid.Android.dll
    Syntax
    public class GridHeaderCellControl : CellElement, View.IOnClickListener, IJavaObject, IDisposable, IJavaPeerable, View.IOnLongClickListener

    Constructors

    GridHeaderCellControl(Context)

    Initializes a new instance of the GridHeaderCellControl class.

    Declaration
    public GridHeaderCellControl(Context context)
    Parameters
    Type Name Description
    Android.Content.Context context

    The Android.Content.Context.

    Properties

    ColumnIndex

    Gets or sets the column index of the header cell.

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

    The column index of the header cell.

    DataColumn

    Gets the data column associated with the header cell which contains the details of the column.

    Declaration
    public DataColumnBase DataColumn { get; }
    Property Value
    Type Description
    Syncfusion.SfDataGrid.DataColumnBase

    An object that represents the Syncfusion.SfDataGrid.DataColumn associated with the GridHeaderCellControl, which contains the details of the column.

    Gridcolumn

    Declaration
    public GridColumn Gridcolumn { get; }
    Property Value
    Type
    GridColumn

    GridColumn

    Gets the GridColumn associated with the header cell.

    Declaration
    public GridColumn GridColumn { get; set; }
    Property Value
    Type Description
    GridColumn

    The GridColumn associated with the header cell.

    GridModel

    Gets or sets the GridModel of the SfDataGrid control, where grid model represents the wrapper class of datagrid, handling the underlying collection and view related operations.

    Declaration
    public GridModel GridModel { get; set; }
    Property Value
    Type Description
    GridModel

    The GridModel of the SfDataGrid control.

    RowIndex

    Gets or sets the row index of the header row.

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

    The row index of the header row.

    Remarks

    The header index can also be obtained using the following code example.

    Examples
    var headerIndex = dataGrid.GetHeaderIndex();

    SortAscend

    Gets or sets the image view representing the sort icon based on the sort direction.

    Declaration
    public ImageView SortAscend { get; set; }
    Property Value
    Type Description
    Android.Widget.ImageView

    The image view representing the sort icon based on the sort direction.

    SortColumn

    Gets or sets the column that represents sorting in the Columns collection, which contains the columns in the datagrid.

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

    The column that represents sorting in the Columns collection.

    Remarks

    The sort direction of the column that represents sorting can be obtained using SortDirection property.

    SortDirection

    Gets or sets the sort direction of the associated GridColumn which is sorted.

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

    The sort direction of the associated GridColumn which is sorted.

    Remarks

    The grid column which is sorted can be obtained from the SortColumn property of the grid header cell control.

    See Also
    SortColumn

    Methods

    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

    if true - release both managed and unmanaged resources; if false - release only unmanaged resources.

    Overrides
    CellElement.Dispose(Boolean)

    OnClick(View)

    This method arises when the header cell is clicked.

    Declaration
    public void OnClick(View view)
    Parameters
    Type Name Description
    Android.Views.View view

    The view of the header cell, which is clicked.

    OnDraw(Canvas)

    The borders for the header cell is drawn here.

    Declaration
    protected override void OnDraw(Canvas canvas)
    Parameters
    Type Name Description
    Android.Graphics.Canvas canvas

    The canvas on which the background will be drawn.

    OnLayout(Boolean, Int32, Int32, Int32, Int32)

    TextViews loaded inside the GridHeaderCellControl is arranged here. Called from VisualContainer's layout when this view should assign a size and position to each of its children. Derived classes with children should override this method and call layout on each of their children.

    Declaration
    protected override void OnLayout(bool changed, int left, int top, int right, int bottom)
    Parameters
    Type Name Description
    System.Boolean changed

    True if the size of the view is changed, otherwise false.

    System.Int32 left

    Left position, relative to parent

    System.Int32 top

    Top position, relative to parent

    System.Int32 right

    Right position, relative to parent

    System.Int32 bottom

    Bottom position, relative to parent

    Overrides
    CellElement.OnLayout(Boolean, Int32, Int32, Int32, Int32)

    OnLongClick(View)

    This method arises when the grid cell is long clicked.

    Declaration
    public bool OnLongClick(View v)
    Parameters
    Type Name Description
    Android.Views.View v

    The view of the grid cell, which is long clicked.

    Returns
    Type Description
    System.Boolean

    Returns a boolean value indicating whether long click is handled or not.

    OnTouchEvent(MotionEvent)

    This event arises when the header cell is touched.

    Declaration
    public override bool OnTouchEvent(MotionEvent e)
    Parameters
    Type Name Description
    Android.Views.MotionEvent e

    The Android.Views.MotionEvent.

    Returns
    Type Description
    System.Boolean

    Returns a boolean value indicating whether the touch is handled or not.

    PerformClick()

    Call this view's OnClickListener, if it is defined.

    Declaration
    public override bool PerformClick()
    Returns
    Type Description
    System.Boolean

    Return whether to perform click or not

    Update()

    Updates the header cell components of a column.

    Declaration
    public void Update()

    Implements

    Android.Views.View.IOnClickListener
    Android.Runtime.IJavaObject
    System.IDisposable
    Java.Interop.IJavaPeerable
    Android.Views.View.IOnLongClickListener
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved