menu

Xamarin.Forms

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

    Show / Hide Table of Contents

    Class GridHeaderCellControl

    Represents a header cell in a SfDataGrid control.

    Inheritance
    System.Object
    BorderView
    CellElement
    GridHeaderCellControl
    GridStackedHeaderCellControl
    Implements
    System.IDisposable
    Inherited Members
    BorderView.BorderColor
    BorderView.BorderColorProperty
    BorderView.BorderThickness
    BorderView.BorderThicknessProperty
    BorderView.Dispose()
    BorderView.Visibility
    BorderView.VisibilityProperty
    CellElement.NeedToInvalidate
    CellElement.NeedToInvalidateProperty
    CellElement.OnBindingContextChanged()
    Namespace: Syncfusion.SfDataGrid.XForms
    Assembly: Syncfusion.SfDataGrid.XForms.dll
    Syntax
    public class GridHeaderCellControl : CellElement, IVisibility, IDisposable

    Constructors

    GridHeaderCellControl()

    Initializes a new instance of the GridHeaderCellControl class.

    Declaration
    public GridHeaderCellControl()

    Fields

    ClipProperty

    Identifies the Clip Xamarin.Forms.BindableProperty.

    Declaration
    public static readonly BindableProperty ClipProperty
    Field Value
    Type
    Xamarin.Forms.BindableProperty
    Remarks

    This Xamarin.Forms.BindableProperty is read-only.

    Properties

    Clip

    Gets or sets the clip value of the header cell.

    Declaration
    public Rectangle Clip { get; set; }
    Property Value
    Type Description
    Xamarin.Forms.Rectangle

    The clip value of the header cell.

    ColumnIndex

    Gets the column index of the header cell.

    Declaration
    public int ColumnIndex { get; }
    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.XForms.DataColumnBase

    An object that represents the Syncfusion.SfDataGrid.XForms.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; }
    Property Value
    Type Description
    GridColumn

    The GridColumn associated with the header cell.

    GridModel

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

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

    The GridModel of the SfDataGrid control.

    RowIndex

    Gets the row index of the header row.

    Declaration
    public int RowIndex { get; }
    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 SfImageView SortAscend { get; set; }
    Property Value
    Type Description
    SfImageView

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

    SortColumn

    Gets the column that represents sorting in the Columns collection, which contains the columns in the SfDataGrid.

    Declaration
    public object SortColumn { get; }
    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
    BorderView.Dispose(Boolean)

    LayoutChildren(Double, Double, Double, Double)

    Positions and sizes the Content of the GridHeaderCellControl.

    Declaration
    protected override void LayoutChildren(double x, double y, double width, double height)
    Parameters
    Type Name Description
    System.Double x

    A value representing the x coordinate of the child region bounding box.

    System.Double y

    A value representing the y coordinate of the child region bounding box.

    System.Double width

    A value representing the width of the child region bounding box.

    System.Double height

    A value representing the height of the child region bounding box.

    MakeSort()

    Sort the data of a column against the user tap on a column header.

    Declaration
    protected void MakeSort()

    OnChildMeasureInvalidated()

    Invoked whenever a child of the layout has emitted Xamarin.Forms.VisualElement.MeasureInvalidated.

    Declaration
    protected override void OnChildMeasureInvalidated()

    OnChildRemoved(Element)

    Invoked whenever a child is removed from GridHeaderCellControl.

    Declaration
    protected override void OnChildRemoved(Element child)
    Parameters
    Type Name Description
    Xamarin.Forms.Element child

    The element that was removed.

    ShouldInvalidateOnChildAdded(View)

    Method to decide whether to call Xamarin.Forms.VisualElement.InvalidateMeasure when adding a child.

    Declaration
    protected override bool ShouldInvalidateOnChildAdded(View child)
    Parameters
    Type Name Description
    Xamarin.Forms.View child

    The Content of the GridHeaderCellControl.

    Returns
    Type Description
    System.Boolean

    A boolean value do decide whether to invalidate when adding a child.

    Overrides
    CellElement.ShouldInvalidateOnChildAdded(View)

    ShouldInvalidateOnChildRemoved(View)

    Method to decide whether to call Xamarin.Forms.VisualElement.InvalidateMeasure when removing a child.

    Declaration
    protected override bool ShouldInvalidateOnChildRemoved(View child)
    Parameters
    Type Name Description
    Xamarin.Forms.View child

    The Content of the GridHeaderCellControl.

    Returns
    Type Description
    System.Boolean

    A boolean value do decide whether to invalidate when removing a child.

    Overrides
    CellElement.ShouldInvalidateOnChildRemoved(View)

    Update()

    Updates the header cell components of a column.

    Declaration
    public void Update()

    Implements

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