menu

Class DataGridStyle - Xamarin.Android API Reference | Syncfusion

    Show / Hide Table of Contents

    Class DataGridStyle

    Represents the style of a SfDataGrid control.

    Inheritance
    System.Object
    DataGridStyle
    DefaultStyle
    Implements
    System.IDisposable
    Namespace: Syncfusion.SfDataGrid
    Assembly: Syncfusion.SfDataGrid.Android.dll
    Syntax
    public class DataGridStyle : Object, IDisposable
    Remarks

    DataGridStyle allows you to set style for all the elements in a SfDataGrid control. To apply a custom style to change the visual appearance of all the elements in the SfDataGrid, write a class overriding from DataGridStyle and assigning it to the GridStyle property.

    Constructors

    DataGridStyle()

    Initializes a new instance of the DataGridStyle class.

    Declaration
    public DataGridStyle()

    Properties

    AlternatingRowColor

    Gets or sets the alternate row color of the SfDataGrid. The alternation count of the rows for which the alternate row color can be customized by using AlternationCount property.

    Declaration
    public Color AlternatingRowColor { get; set; }
    Property Value
    Type Description
    Android.Graphics.Color

    The alternate row color of the SfDataGrid.

    Remarks

    SfDataGrid allows the user to set alternate row color by setting the AlternatingRowColor property to GridStyle. property. SfDataGrid allows you to customize the rows for which the alternate row color needs to be updated based on the AlternationCount property.

    Examples
    DataGrid.GridStyle.AlternatingRowColor = Color.Blue;
    DataGrid.AlternationCount = 3;
    See Also
    https://www.syncfusion.com/kb/6212/how-to-apply-alternate-row-colors-in-sfdatagrid

    BorderColor

    Gets or sets the border color of SfDataGrid.

    Declaration
    public Color BorderColor { get; set; }
    Property Value
    Type Description
    Android.Graphics.Color

    The border color of SfDataGrid.

    CaptionRowBackgroundColor

    Gets or sets the CaptionSummaryRow's background color.

    Declaration
    public Color CaptionRowBackgroundColor { get; set; }
    Property Value
    Type Description
    Android.Graphics.Color

    The CaptionSummaryRow's background color.

    CaptionRowForegroundColor

    Gets or sets the CaptionSummaryRow's foreground color.

    Declaration
    public Color CaptionRowForegroundColor { get; set; }
    Property Value
    Type Description
    Android.Graphics.Color

    The CaptionSummaryRow's foreground color.

    CellBackground

    Gets or sets the record's background color.

    Declaration
    public Color CellBackground { get; set; }
    Property Value
    Type Description
    Android.Graphics.Color

    The record's background color.

    CellForeground

    Gets or sets the record's foreground color.

    Declaration
    public Color CellForeground { get; set; }
    Property Value
    Type Description
    Android.Graphics.Color

    The record's foreground color.

    DefaultRowColor

    Gets or sets the default row color of SfDataGrid.

    Declaration
    public Color DefaultRowColor { get; set; }
    Property Value
    Type Description
    Android.Graphics.Color

    The default row color of SfDataGrid.

    HeaderBackground

    Gets or sets the header's background color.

    Declaration
    public Color HeaderBackground { get; set; }
    Property Value
    Type Description
    Android.Graphics.Color

    The header's background color.

    HeaderForeground

    Gets or sets the header's foreground color.

    Declaration
    public Color HeaderForeground { get; set; }
    Property Value
    Type Description
    Android.Graphics.Color

    The header's foreground color.

    HeaderSortIndicatorDown

    Gets or sets the Resource ID from the Android resources for the header sort down indicator icon.

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

    The Resource ID from the Android resources for the header sort down indicator icon.

    HeaderSortIndicatorUp

    Gets or sets the Resource ID from the Android resources for the header sort up indicator icon.

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

    The Resource ID from the Android resources for the header sort up indicator icon.

    SelectionBackgroundColor

    Gets or sets the background color of the selected row.

    Declaration
    public Color SelectionBackgroundColor { get; set; }
    Property Value
    Type Description
    Android.Graphics.Color

    The background color of the selected row.

    SelectionForegroundColor

    Gets or sets the foreground color of the selected row.

    Declaration
    public Color SelectionForegroundColor { get; set; }
    Property Value
    Type Description
    Android.Graphics.Color

    The foreground color of the selected row.

    Methods

    Dispose()

    Releases the resources used by the component.

    Declaration
    public void Dispose()

    Dispose(Boolean)

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

    Declaration
    protected virtual 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.

    GetAlternatingRowBackgroundColor()

    Gets the AlternatingRow's background color.

    Declaration
    public virtual Color GetAlternatingRowBackgroundColor()
    Returns
    Type Description
    Android.Graphics.Color

    The AlternatingRow's background color.

    GetBordercolor()

    Declaration
    public virtual Color GetBordercolor()
    Returns
    Type
    Android.Graphics.Color

    GetBorderColor()

    Gets the border color of SfDataGrid.

    Declaration
    public virtual Color GetBorderColor()
    Returns
    Type Description
    Android.Graphics.Color

    The border color of SfDataGrid.

    GetBorderWidth()

    Gets or sets the border width for the grid cells.

    Declaration
    public virtual float GetBorderWidth()
    Returns
    Type Description
    System.Single

    The grid header cell border width

    GetCaptionSummaryFontAttribute()

    Gets the font attribute for the caption summary row text.

    Declaration
    public virtual TypefaceStyle GetCaptionSummaryFontAttribute()
    Returns
    Type Description
    Android.Graphics.TypefaceStyle

    Returns the font attribute for the caption summary row text.

    GetCaptionSummaryRowBackgroundColor()

    Gets the CaptionSummaryRow's background color.

    Declaration
    public virtual Color GetCaptionSummaryRowBackgroundColor()
    Returns
    Type Description
    Android.Graphics.Color

    The CaptionSummaryRow's background color.

    GetCaptionSummaryRowBackgroundColor(Group)

    Gets the CaptionSummaryRow's background color.

    Declaration
    public virtual Color GetCaptionSummaryRowBackgroundColor(Group group)
    Parameters
    Type Name Description
    Group group

    The group.

    Returns
    Type Description
    Android.Graphics.Color

    The CaptionSummaryRow's background color.

    GetCaptionSummaryRowForegroundColor()

    Gets the CaptionSummaryRow's foreground color.

    Declaration
    public virtual Color GetCaptionSummaryRowForegroundColor()
    Returns
    Type Description
    Android.Graphics.Color

    The CaptionSummaryRow's foreground color.

    GetCaptionSummaryRowForeGroundColor()

    Declaration
    public virtual Color GetCaptionSummaryRowForeGroundColor()
    Returns
    Type
    Android.Graphics.Color

    GetCaptionSummaryRowForegroundColor(Group)

    Gets the CaptionSummaryRow's foreground color for specified group.

    Declaration
    public virtual Color GetCaptionSummaryRowForegroundColor(Group group)
    Parameters
    Type Name Description
    Group group

    The group

    Returns
    Type Description
    Android.Graphics.Color

    The CaptionSummaryRow's foreground color.

    GetColumnDragDownIndicator()

    Gets the Resource ID from the Android resources for the column drag down indicator icon.

    Declaration
    public virtual int GetColumnDragDownIndicator()
    Returns
    Type Description
    System.Int32

    The Resource ID from the Android resources for the column drag down indicator icon.

    GetColumnDragUpIndicator()

    Gets the Resource ID from the Android resources for the column drag up indicator icon.

    Declaration
    public virtual int GetColumnDragUpIndicator()
    Returns
    Type Description
    System.Int32

    The Resource ID from the Android resources for the column drag up indicator icon.

    GetColumnDragViewBackgroundColor()

    Gets the column drag view background color.

    Declaration
    protected virtual Color GetColumnDragViewBackgroundColor()
    Returns
    Type Description
    Android.Graphics.Color

    The column drag view background color.

    GetColumnDragViewBorderColor()

    Gets the column drag view border color.

    Declaration
    protected virtual Color GetColumnDragViewBorderColor()
    Returns
    Type Description
    Android.Graphics.Color

    The column drag view border color.

    GetColumnDragViewForegroundColor()

    Gets the column drag view foreground color.

    Declaration
    protected virtual Color GetColumnDragViewForegroundColor()
    Returns
    Type Description
    Android.Graphics.Color

    The column drag view foreground color.

    GetColumnResizingIndicatorIcon()

    Gets the Resource ID from the Android resources for the column resizing indicator icon.

    Declaration
    public virtual int GetColumnResizingIndicatorIcon()
    Returns
    Type Description
    System.Int32

    The Resource ID from the Android resources for the column resizing indicator icon.

    GetCurrentCellBorderColor()

    Gets the border color of the current cell which is focused.

    Declaration
    public virtual Color GetCurrentCellBorderColor()
    Returns
    Type Description
    Android.Graphics.Color

    The border color of the current cell which is focused.

    GetCurrentCellBorderWidth()

    Declaration
    public virtual float GetCurrentCellBorderWidth()
    Returns
    Type
    System.Single

    GetGridLinesVisibility()

    Gets the type of the borders to be drawn in SfDataGrid.

    Declaration
    public virtual GridLinesVisibility GetGridLinesVisibility()
    Returns
    Type Description
    GridLinesVisibility

    The GridLinesVisibility for SfDataGrid.

    GetGroupCollapseIcon()

    Gets the Resource ID from the Android resources for the group collapse icon.

    Declaration
    public virtual int GetGroupCollapseIcon()
    Returns
    Type Description
    System.Int32

    The Resource ID from the Android resources for the group collapse icon.

    GetGroupExpanderIcon()

    Gets the Resource ID from the Android resources for group expander icon.

    Declaration
    public virtual int GetGroupExpanderIcon()
    Returns
    Type Description
    System.Int32

    The Resource ID from the Android resources for group expander icon.

    GetGroupSummaryFontAttribute()

    Gets the font attribute for the group summary row text.

    Declaration
    public virtual TypefaceStyle GetGroupSummaryFontAttribute()
    Returns
    Type Description
    Android.Graphics.TypefaceStyle

    Returns the font attribute for the group summary row text.

    GetGroupSummaryRowBackgroundColor()

    Gets the GroupSummaryRow's background color.

    Declaration
    public virtual Color GetGroupSummaryRowBackgroundColor()
    Returns
    Type Description
    Android.Graphics.Color

    The GroupSummaryRow's background color.

    GetGroupSummaryRowForegroundColor()

    Gets the GroupSummaryRow's foreground color.

    Declaration
    public virtual Color GetGroupSummaryRowForegroundColor()
    Returns
    Type Description
    Android.Graphics.Color

    The GroupSummaryRow's foreground color.

    GetHeaderBackgroundColor()

    Gets the header's background color.

    Declaration
    public virtual Color GetHeaderBackgroundColor()
    Returns
    Type Description
    Android.Graphics.Color

    The header's background color.

    GetHeaderBorderColor()

    Gets the Headerborder color of SfDataGrid.

    Declaration
    public virtual Color GetHeaderBorderColor()
    Returns
    Type Description
    Android.Graphics.Color

    The Headerborder color of SfDataGrid

    GetHeaderBorderWidth()

    Gets or sets the border width for the header cells.

    Declaration
    public virtual float GetHeaderBorderWidth()
    Returns
    Type Description
    System.Single

    The grid header cell border width

    GetHeaderForegroundColor()

    Gets the header's foreground color.

    Declaration
    public virtual Color GetHeaderForegroundColor()
    Returns
    Type Description
    Android.Graphics.Color

    The header's foreground color.

    GetHeaderSortIndicatorDown()

    Gets the Resource ID from the Android resources for the header sort down indicator icon.

    Declaration
    public virtual int GetHeaderSortIndicatorDown()
    Returns
    Type Description
    System.Int32

    The Resource ID from the Android resources for the header sort down indicator icon.

    GetHeaderSortIndicatorUp()

    Gets the Resource ID from the Android resources for the header sort up indicator icon.

    Declaration
    public virtual int GetHeaderSortIndicatorUp()
    Returns
    Type Description
    System.Int32

    The Resource ID from the Android resources for header sort indicator up icon.

    GetIndentBackgroundColor(RowType)

    Gets the IndentCell's background color.

    Declaration
    public virtual Color GetIndentBackgroundColor(RowType rowType)
    Parameters
    Type Name Description
    RowType rowType

    The type of DataRow.

    Returns
    Type Description
    Android.Graphics.Color

    The IndentCell's background color.

    GetLoadMoreViewBackgroundColor()

    Gets the load more view background color.

    Declaration
    public virtual Color GetLoadMoreViewBackgroundColor()
    Returns
    Type Description
    Android.Graphics.Color

    The load more view background color.

    GetLoadMoreViewForegroundColor()

    Gets the load more view foreground color.

    Declaration
    public virtual Color GetLoadMoreViewForegroundColor()
    Returns
    Type Description
    Android.Graphics.Color

    The load more view foreground color.

    GetRecordBackgroundColor()

    Gets the record's background color.

    Declaration
    public virtual Color GetRecordBackgroundColor()
    Returns
    Type Description
    Android.Graphics.Color

    The record's background color.

    GetRecordForegroundColor()

    Gets the record's foreground color.

    Declaration
    public virtual Color GetRecordForegroundColor()
    Returns
    Type Description
    Android.Graphics.Color

    The record's foreground color.

    GetResizingIndicatorColor()

    Gets the color of the column resizing cursor.

    Declaration
    public virtual Color GetResizingIndicatorColor()
    Returns
    Type Description
    Android.Graphics.Color

    The color of the column resizing cursor.

    GetRowDragDownIndicator()

    Gets the Resource ID from the Android resources for the row drag down indicator icon.

    Declaration
    public virtual int GetRowDragDownIndicator()
    Returns
    Type Description
    System.Int32

    The Resource ID from the Android resources for the row drag down indicator icon.

    GetRowDragUpIndicator()

    Gets the Resource ID from the Android resources for the row drag up indicator icon.

    Declaration
    public virtual int GetRowDragUpIndicator()
    Returns
    Type Description
    System.Int32

    The Resource ID from the Android resources for the row drag up indicator icon.

    GetSelectionBackgroundColor()

    Gets the background color of the selected row.

    Declaration
    public virtual Color GetSelectionBackgroundColor()
    Returns
    Type Description
    Android.Graphics.Color

    The background color of the selected row.

    GetSelectionForegroundColor()

    Gets the foreground color of the selected row.

    Declaration
    public virtual Color GetSelectionForegroundColor()
    Returns
    Type Description
    Android.Graphics.Color

    The foreground color of the selected row.

    GetSummaryVerticalLineVisibility()

    Gets the visibility of the vertical borders in summary rows when ShowSummaryInRow is false.

    Declaration
    public virtual bool GetSummaryVerticalLineVisibility()
    Returns
    Type Description
    System.Boolean

    Returns the visibility of the vertical borders in summary rows when ShowSummaryInRow is false.

    GetTableSummaryBackgroundColor()

    Gets the TableSummaryRow's background color.

    Declaration
    public virtual Color GetTableSummaryBackgroundColor()
    Returns
    Type Description
    Android.Graphics.Color

    The TableSummaryRow's background color.

    GetTableSummaryFontAttribute()

    Gets the font attribute for the table summary row text.

    Declaration
    public virtual TypefaceStyle GetTableSummaryFontAttribute()
    Returns
    Type Description
    Android.Graphics.TypefaceStyle

    Returns the font attribute for the table summary row text.

    GetTableSummaryForegroundColor()

    Gets the TableSummaryRow's foreground color.

    Declaration
    public virtual Color GetTableSummaryForegroundColor()
    Returns
    Type Description
    Android.Graphics.Color

    The TableSummaryRow's foreground color.

    GetUnboundRowBackgroundColor()

    Gets the UnboundRow's background color.

    Declaration
    public virtual Color GetUnboundRowBackgroundColor()
    Returns
    Type Description
    Android.Graphics.Color

    The UnboundRow's background color.

    GetUnboundRowFontAttribute()

    Gets the font attribute for the unbound row text.

    Declaration
    public virtual TypefaceStyle GetUnboundRowFontAttribute()
    Returns
    Type Description
    Android.Graphics.TypefaceStyle

    Returns the font attribute for the unbound row text

    GetUnboundRowForegroundColor()

    Gets the UnboundRow's Foreground color.

    Declaration
    public virtual Color GetUnboundRowForegroundColor()
    Returns
    Type Description
    Android.Graphics.Color

    The UnboundRow's Foreground color.

    Implements

    System.IDisposable

    See Also

    https://help.syncfusion.com/xamarin-android/sfdatagrid/styles
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved