menu

MAUI

  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class SfDataGrid - MAUI API Reference | Syncfusion

    Show / Hide Table of Contents

    Class SfDataGrid

    A data bound grid control that displays the data from data source in a tabular view. The SfDataGrid control allows you to display different types of columns, sort and select the rows.

    Inheritance
    System.Object
    SfView
    SfDataGrid
    DetailsViewDataGrid
    Implements
    IDrawableLayout
    Microsoft.Maui.Graphics.IDrawable
    Microsoft.Maui.IAbsoluteLayout
    Microsoft.Maui.ILayout
    Microsoft.Maui.IView
    Microsoft.Maui.IElement
    Microsoft.Maui.ITransform
    Microsoft.Maui.IContainer
    System.Collections.Generic.IList<Microsoft.Maui.IView>
    System.Collections.Generic.ICollection<Microsoft.Maui.IView>
    System.Collections.Generic.IEnumerable<Microsoft.Maui.IView>
    System.Collections.IEnumerable
    Microsoft.Maui.ISafeAreaView
    Microsoft.Maui.IPadding
    Microsoft.Maui.ICrossPlatformLayout
    Microsoft.Maui.IVisualTreeElement
    Inherited Members
    SfView.ArrangeOverride(Rect)
    SfView.Children
    SfView.ClipToBounds
    SfView.GetSemanticsNodesCore(Double, Double)
    SfView.IDrawableLayout.DrawingOrder
    SfView.IDrawableLayout.InvalidateDrawable()
    SfView.MeasureOverride(Double, Double)
    SfView.OnBindingContextChanged()
    SfView.Padding
    Namespace: Syncfusion.Maui.DataGrid
    Assembly: Syncfusion.Maui.DataGrid.dll
    Syntax
    public class SfDataGrid : SfView, IDrawableLayout, IDrawable, IAbsoluteLayout, ILayout, IView, IElement, ITransform, IContainer, IList<IView>, ICollection<IView>, IEnumerable<IView>, IEnumerable, ISafeAreaView, IPadding, ICrossPlatformLayout, IVisualTreeElement, ISemanticsProvider, IParentThemeElement, IThemeElement, IPullToRefresh, IDetailsViewNotifier
    Remarks

    To bind the SfDataGrid to data, set the ItemsSource property to an System.Collections.IEnumerable implementation. Each row in the data grid is bound to an object in the data source, and each column in the data grid is bound to a property of the data object. In order for the SfDataGrid user interface to update automatically when items are added to or removed from the source data, the SfDataGrid must be bound to a collection that implements the System.Collections.Specialized.INotifyCollectionChanged interface, such as an System.Collections.ObjectModel.ObservableCollection<>. To automatically reflect property changes, the objects in the source collection must implement the System.ComponentModel.INotifyPropertyChanged interface.

    Constructors

    SfDataGrid()

    Initializes a new instance of the SfDataGrid class.

    Declaration
    public SfDataGrid()

    Fields

    AllowColumnSelectionProperty

    Identifies the AllowColumnSelection bindable property.

    Declaration
    public static readonly BindableProperty AllowColumnSelectionProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty
    Remarks

    The AllowColumnSelection property determines the Column Selection of the SfDataGrid.

    AllowDeletingProperty

    Bindable property for AllowDeleting

    Declaration
    public static readonly BindableProperty AllowDeletingProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    AllowDiagonalScrollingProperty

    Identifies the AllowDiagonalScrolling Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty AllowDiagonalScrollingProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty
    Remarks

    The AllowDiagonalScrollingProperty determines whether diagonal scrolling is allowed in the SfDataGrid. By default, diagonal scrolling is enabled. When set to false, users can only scroll either horizontally or vertically at a time.

    AllowDraggingColumnProperty

    Identifies the AllowDraggingColumn Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty AllowDraggingColumnProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty
    Remarks

    This Microsoft.Maui.Controls.BindableProperty is read-only.

    AllowDraggingRowProperty

    Bindable property for AllowDraggingRow.

    Declaration
    public static readonly BindableProperty AllowDraggingRowProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    AllowEditingProperty

    Identifies the AllowEditing Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty AllowEditingProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty
    Remarks

    This Microsoft.Maui.Controls.BindableProperty is read-only.

    AllowGroupExpandCollapseProperty

    to do

    Declaration
    public static readonly BindableProperty AllowGroupExpandCollapseProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    AllowKeyboardNavigationProperty

    Bindable property for AllowKeyboardNavigation

    Declaration
    public static readonly BindableProperty AllowKeyboardNavigationProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    AllowLoadMoreProperty

    Identifies the AllowLoadMore Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty AllowLoadMoreProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty
    Remarks

    This Microsoft.Maui.Controls.BindableProperty is read-only.

    AllowPullToRefreshProperty

    Declaration
    public static readonly BindableProperty AllowPullToRefreshProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    AllowResizingColumnsProperty

    Identifies the AllowResizingColumns Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty AllowResizingColumnsProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    AllowSwipingProperty

    Identifies the AllowSwiping bindable property.

    Declaration
    public static readonly BindableProperty AllowSwipingProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty
    Remarks

    The AllowSwiping property controls whether swiping is enabled on the rows of the SfDataGrid.

    AllowTriStateSortingProperty

    Identifies the AllowTriStateSorting Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty AllowTriStateSortingProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty
    Remarks

    This Microsoft.Maui.Controls.BindableProperty is read-only.

    AlternationRowCountProperty

    Identifies the AlternationRowCount Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty AlternationRowCountProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty
    Remarks

    This Microsoft.Maui.Controls.BindableProperty is read-only.

    AutoExpandGroupsProperty

    to do

    Declaration
    public static readonly BindableProperty AutoExpandGroupsProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    AutoGenerateColumnsModeForCustomTypeProperty

    Identifies the AutoGenerateColumnsModeForCustomType Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty AutoGenerateColumnsModeForCustomTypeProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty
    Remarks

    This Microsoft.Maui.Controls.BindableProperty is read-only.

    AutoGenerateColumnsModeProperty

    Identifies the AutoGenerateColumnsMode Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty AutoGenerateColumnsModeProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty
    Remarks

    This Microsoft.Maui.Controls.BindableProperty is read-only.

    AutoGenerateRelationsProperty

    Identifies the AutoGenerateRelations bindable property.

    Declaration
    public static readonly BindableProperty AutoGenerateRelationsProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    CanMaintainScrollPositionProperty

    Identifies theCanMaintainScrollPosition Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty CanMaintainScrollPositionProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty
    Remarks

    This Microsoft.Maui.Controls.BindableProperty is read-only.

    CanUseViewFilterProperty

    Bindable property for CanUseViewFilter

    Declaration
    public static readonly BindableProperty CanUseViewFilterProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    CaptionSummaryRowProperty

    to do

    Declaration
    public static readonly BindableProperty CaptionSummaryRowProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    CaptionSummaryTemplateProperty

    Bindable property for CaptionSummaryTemplate

    Declaration
    public static readonly BindableProperty CaptionSummaryTemplateProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    CellDoubleTappedCommandParameterProperty

    Bindable property for CellDoubleTappedCommandParameter

    Declaration
    public static readonly BindableProperty CellDoubleTappedCommandParameterProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    CellDoubleTappedCommandProperty

    Bindable property for CellDoubleTappedCommand

    Declaration
    public static readonly BindableProperty CellDoubleTappedCommandProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    CellEnteredCommandParameterProperty

    Bindable property for CellEnteredCommandParameter

    Declaration
    public static readonly BindableProperty CellEnteredCommandParameterProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    CellEnteredCommandProperty

    Bindable property for CellEnteredCommand

    Declaration
    public static readonly BindableProperty CellEnteredCommandProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    CellExitedCommandParameterProperty

    Bindable property for CellExitedCommandParameter

    Declaration
    public static readonly BindableProperty CellExitedCommandParameterProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    CellExitedCommandProperty

    Bindable property for CellExitedCommand

    Declaration
    public static readonly BindableProperty CellExitedCommandProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    CellHoveredCommandParameterProperty

    Bindable property for CellHoveredCommandParameter

    Declaration
    public static readonly BindableProperty CellHoveredCommandParameterProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    CellHoveredCommandProperty

    Bindable property for CellHoveredCommand

    Declaration
    public static readonly BindableProperty CellHoveredCommandProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    CellLongPressCommandParameterProperty

    Bindable property for CellLongPressCommandParameter

    Declaration
    public static readonly BindableProperty CellLongPressCommandParameterProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    CellLongPressCommandProperty

    Bindable property for CellLongPressCommand

    Declaration
    public static readonly BindableProperty CellLongPressCommandProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    CellRenderersProperty

    Identifies the CellRenderers Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty CellRenderersProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty
    Remarks

    This Microsoft.Maui.Controls.BindableProperty is read-only.

    CellRightTappedCommandParameterProperty

    Bindable property for CellRightTappedCommandParameter

    Declaration
    public static readonly BindableProperty CellRightTappedCommandParameterProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    CellRightTappedCommandProperty

    Bindable property for CellRightTappedCommand

    Declaration
    public static readonly BindableProperty CellRightTappedCommandProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    CellTappedCommandParameterProperty

    Bindable property for CellTappedCommandParameter

    Declaration
    public static readonly BindableProperty CellTappedCommandParameterProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    CellTappedCommandProperty

    Bindable property for CellTappedCommand

    Declaration
    public static readonly BindableProperty CellTappedCommandProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    ColumnsProperty

    Identifies the Columns Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty ColumnsProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty
    Remarks

    This Microsoft.Maui.Controls.BindableProperty is read-only.

    ColumnWidthModeProperty

    Identifies the ColumnWidthMode Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty ColumnWidthModeProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty
    Remarks

    This Microsoft.Maui.Controls.BindableProperty is read-only.

    CurrentCellManagerProperty

    Bindable property for CurrentCellManager

    Declaration
    public static readonly BindableProperty CurrentCellManagerProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    CurrentCellProperty

    Identifies the CurrentCell Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty CurrentCellProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty
    Remarks

    This Microsoft.Maui.Controls.BindableProperty is read-only.

    CurrentRowProperty

    Identifies the CurrentRow Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty CurrentRowProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty
    Remarks

    This Microsoft.Maui.Controls.BindableProperty is read-only.

    DataFetchSizeProperty

    Bindable property of DataFetchSize

    Declaration
    public static readonly BindableProperty DataFetchSizeProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    DefaultColumnWidthProperty

    Identifies the DefaultColumnWidth Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty DefaultColumnWidthProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty
    Remarks

    This Microsoft.Maui.Controls.BindableProperty is read-only.

    DefaultStyleProperty

    Identifies the DefaultStyle Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty DefaultStyleProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty
    Remarks

    This Microsoft.Maui.Controls.BindableProperty is read-only.

    DetailsViewDefaultStyleProperty

    Identifies the bindable property.

    Declaration
    public static readonly BindableProperty DetailsViewDefaultStyleProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    DetailsViewDefinitionProperty

    Identifies the DetailsViewDefinition bindable property.

    Declaration
    public static readonly BindableProperty DetailsViewDefinitionProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    DetailsViewPaddingProperty

    Identifies the DetailsViewPadding bindable property.

    Declaration
    public static readonly BindableProperty DetailsViewPaddingProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    EditTapActionProperty

    Identifies the AllowEditing Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty EditTapActionProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty
    Remarks

    This Microsoft.Maui.Controls.BindableProperty is read-only.

    EmptyViewProperty

    Bindable property for EmptyView.

    Declaration
    public static readonly BindableProperty EmptyViewProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    EmptyViewTemplateProperty

    Bindable property for EmptyViewTemplate.

    Declaration
    public static readonly BindableProperty EmptyViewTemplateProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    EnableDataVirtualizationProperty

    Bindable Property for EnableDataVirtualization

    Declaration
    public static readonly BindableProperty EnableDataVirtualizationProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    ExpanderColumnWidthProperty

    Identifies the ExpanderColumnWidth dependency property.

    Declaration
    public static readonly BindableProperty ExpanderColumnWidthProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    FrozenColumnCountProperty

    Identifies the FrozenColumnCount Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty FrozenColumnCountProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty
    Remarks

    This Microsoft.Maui.Controls.BindableProperty is read-only.

    FrozenRowCountProperty

    Identifies the FrozenRowCount Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty FrozenRowCountProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty
    Remarks

    This Microsoft.Maui.Controls.BindableProperty is read-only.

    GridLinesVisibilityProperty

    Identifies the GridLinesVisibility Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty GridLinesVisibilityProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty
    Remarks

    This Microsoft.Maui.Controls.BindableProperty is read-only.

    GroupCaptionTextFormatProperty

    to do

    Declaration
    public static readonly BindableProperty GroupCaptionTextFormatProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    GroupColumnDescriptionsProperty

    to do

    Declaration
    public static readonly BindableProperty GroupColumnDescriptionsProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    GroupExpandCollapseTemplateProperty

    Identifies the GroupExpandCollapseTemplate

    Declaration
    public static readonly BindableProperty GroupExpandCollapseTemplateProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    GroupingModeProperty

    to do

    Declaration
    public static readonly BindableProperty GroupingModeProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    GroupSummaryRowsProperty

    Declaration
    public static readonly BindableProperty GroupSummaryRowsProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    GroupSummaryTemplateProperty

    Declaration
    public static readonly BindableProperty GroupSummaryTemplateProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    HeaderGridLinesVisibilityProperty

    Identifies the HeaderGridLinesVisibility Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty HeaderGridLinesVisibilityProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty
    Remarks

    This Microsoft.Maui.Controls.BindableProperty is read-only.

    HeaderRowHeightProperty

    Identifies the HeaderRowHeight Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty HeaderRowHeightProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty
    Remarks

    This Microsoft.Maui.Controls.BindableProperty is read-only.

    HorizontalScrollBarVisibilityProperty

    Identifies the HorizontalScrollBarVisibility Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty HorizontalScrollBarVisibilityProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty
    Remarks

    This Microsoft.Maui.Controls.BindableProperty is read-only.

    IndentColumnWidthProperty

    to do

    Declaration
    public static readonly BindableProperty IndentColumnWidthProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    IsBusyProperty

    Identifies the IsBusy Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty IsBusyProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty
    Remarks

    This Microsoft.Maui.Controls.BindableProperty is read-only.

    ItemsSourceProperty

    Identifies the ItemsSource Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty ItemsSourceProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty
    Remarks

    This Microsoft.Maui.Controls.BindableProperty is read-only.

    LeftSwipeTemplateProperty

    Identifies the LeftSwipeTemplate bindable property.

    Declaration
    public static readonly BindableProperty LeftSwipeTemplateProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty
    Remarks

    The LeftSwipeTemplate property defines the content displayed when a row is swiped from left to right in the SfDataGrid.

    LiveDataUpdateModeProperty

    Declaration
    public static readonly BindableProperty LiveDataUpdateModeProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    LoadMoreCommandProperty

    Identifies the LoadMoreCommand Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty LoadMoreCommandProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty
    Remarks

    This Microsoft.Maui.Controls.BindableProperty is read-only.

    LoadMorePositionProperty

    Identifies the LoadMorePosition Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty LoadMorePositionProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty
    Remarks

    This Microsoft.Maui.Controls.BindableProperty is read-only.

    LoadMoreViewProperty

    Identifies the LoadMoreView Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty LoadMoreViewProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty
    Remarks

    This Microsoft.Maui.Controls.BindableProperty is read-only.

    LostFocusBehaviorProperty

    Bindable property for LostFocusBehavior

    Declaration
    public static readonly BindableProperty LostFocusBehaviorProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    MaxSwipeOffsetProperty

    Identifies the MaxSwipeOffset bindable property.

    Declaration
    public static readonly BindableProperty MaxSwipeOffsetProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty
    Remarks

    The MaxSwipeOffset property defines the maximum distance that a row can be swiped before the swipe action is considered complete.

    NavigationModeProperty

    Identifies the NavigationMode Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty NavigationModeProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty
    Remarks

    This Microsoft.Maui.Controls.BindableProperty is read-only.

    NotifyEventsToParentDataGridProperty

    Identifies the NotifyEventsToParentDataGrid bindable property.

    Declaration
    public static readonly BindableProperty NotifyEventsToParentDataGridProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    PullToRefreshCommandProperty

    Declaration
    public static readonly BindableProperty PullToRefreshCommandProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    ReuseRowsOnItemsSourceChangeProperty

    Bindable property for ReuseRowsOnItemsSourceChange

    Declaration
    public static readonly BindableProperty ReuseRowsOnItemsSourceChangeProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    RightSwipeTemplateProperty

    Identifies the RightSwipeTemplate bindable property.

    Declaration
    public static readonly BindableProperty RightSwipeTemplateProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty
    Remarks

    The RightSwipeTemplate property defines the content displayed when a row is swiped from right to left in the SfDataGrid.

    RowDragDropTemplateProperty

    Identifies the RowDragDropTemplate Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty RowDragDropTemplateProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    RowHeaderTemplateProperty

    Bindable property for RowHeaderTemplate

    Declaration
    public static readonly BindableProperty RowHeaderTemplateProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    RowHeaderWidthProperty

    Bindable property for RowHeaderWidth

    Declaration
    public static readonly BindableProperty RowHeaderWidthProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    RowHeightProperty

    Identifies the RowHeight Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty RowHeightProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty
    Remarks

    This Microsoft.Maui.Controls.BindableProperty is read-only.

    SelectedDetailsViewGridProperty

    Identifies the SelectedDetailsViewDataGrid bindable property.

    Declaration
    public static readonly BindableProperty SelectedDetailsViewGridProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    SelectedIndexProperty

    Identifies the SelectedIndex Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty SelectedIndexProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty
    Remarks

    This Microsoft.Maui.Controls.BindableProperty is read-only.

    SelectedRowProperty

    Identifies the SelectedRow Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty SelectedRowProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty
    Remarks

    This Microsoft.Maui.Controls.BindableProperty is read-only.

    SelectedRowsProperty

    Identifies the SelectedRows Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty SelectedRowsProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty
    Remarks

    This Microsoft.Maui.Controls.BindableProperty is read-only.

    SelectionControllerProperty

    Bindable property for SelectionController

    Declaration
    public static readonly BindableProperty SelectionControllerProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    SelectionModeProperty

    Identifies the SelectionMode Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty SelectionModeProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty
    Remarks

    This Microsoft.Maui.Controls.BindableProperty is read-only.

    SelectionUnitProperty

    Identifies the SelectionUnit Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty SelectionUnitProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    ShowColumnWhenGroupedProperty

    to do

    Declaration
    public static readonly BindableProperty ShowColumnWhenGroupedProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    ShowRowHeaderProperty

    Bindable property for ShowRowHeader

    Declaration
    public static readonly BindableProperty ShowRowHeaderProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    ShowSortNumbersProperty

    Identifies the ShowSortNumbers Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty ShowSortNumbersProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty
    Remarks

    This Microsoft.Maui.Controls.BindableProperty is read-only.

    SortColumnDescriptionsProperty

    Identifies the SortColumnDescriptionCollection Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty SortColumnDescriptionsProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty
    Remarks

    This Microsoft.Maui.Controls.BindableProperty is read-only.

    SortComparersProperty

    Identifies the SortComparers Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty SortComparersProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty
    Remarks

    This Microsoft.Maui.Controls.BindableProperty is read-only.

    SortIconTemplateProperty

    Identifies the SortIconTemplate.

    Declaration
    public static readonly BindableProperty SortIconTemplateProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    SortingGestureTypeProperty

    Identifies the SortingGestureType Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty SortingGestureTypeProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty
    Remarks

    This Microsoft.Maui.Controls.BindableProperty is read-only.

    SortingModeProperty

    Identifies the SortingMode Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty SortingModeProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty
    Remarks

    This Microsoft.Maui.Controls.BindableProperty is read-only.

    SourceTypeProperty

    Bindable property for SourceType

    Declaration
    public static readonly BindableProperty SourceTypeProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    StackedHeaderRowsProperty

    to do

    Declaration
    public static readonly BindableProperty StackedHeaderRowsProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    SummaryCalculationModeProperty

    Declaration
    public static readonly BindableProperty SummaryCalculationModeProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    SwipeOffsetModeProperty

    Identifies the SwipeOffsetMode bindable property.

    Declaration
    public static readonly BindableProperty SwipeOffsetModeProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty
    Remarks

    The SwipeOffsetMode property determines how the swipe threshold is calculated, either using a predefined value or the width of the swipe view's content.

    TableSummaryRowsProperty

    Declaration
    public static readonly BindableProperty TableSummaryRowsProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    TableSummaryTemplateProperty

    Declaration
    public static readonly BindableProperty TableSummaryTemplateProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    TransitionTypeProperty

    Bindable property for TransitionType

    Declaration
    public static readonly BindableProperty TransitionTypeProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty
    Remarks

    This Microsoft.Maui.Controls.BindableProperty is read-only.

    UnboundRowProperty

    to do

    Declaration
    public static readonly BindableProperty UnboundRowProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    VerticalOverScrollModeProperty

    Identifies the VerticalOverScrollMode Microsoft.Maui.Controls.BindableProperty

    Declaration
    public static readonly BindableProperty VerticalOverScrollModeProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    VerticalScrollBarVisibilityProperty

    Identifies the VerticalScrollBarVisibility Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty VerticalScrollBarVisibilityProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty
    Remarks

    This Microsoft.Maui.Controls.BindableProperty is read-only.

    ViewProperty

    Identifies the View Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty ViewProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty
    Remarks

    This Microsoft.Maui.Controls.BindableProperty is read-only.

    Properties

    AllowColumnSelection

    Gets or sets a value indicating whether the column selection is applied to SfDataGrid when tapping or double tapping a header cell.

    Declaration
    [Cloneable(false)]
    public bool AllowColumnSelection { get; set; }
    Property Value
    Type Description
    System.Boolean

    It accepts AllowColumnSelection values and the default value is false.

    Remarks

    This property allows you to apply selection to the particular column interactively.

    Examples

    Here is an example of how to set the AllowColumnSelection property

    • XAML
    • C#
    <local:SfDataGrid AllowColumnSelection="True" />
    dataGrid.AllowColumnSelection = True

    AllowDeleting

    Gets or sets a System.Boolean value indicating whether deleting selected rows with the delete key is enabled during navigation. This is a bindable property.

    Declaration
    [Cloneable(false)]
    public bool AllowDeleting { get; set; }
    Property Value
    Type
    System.Boolean

    AllowDiagonalScrolling

    Gets or sets a value indicating whether diagonal scrolling is allowed in the SfDataGrid.

    Declaration
    [Cloneable(false)]
    public bool AllowDiagonalScrolling { get; set; }
    Property Value
    Type Description
    System.Boolean

    Accepts System.Boolean values. The default value is true.

    Remarks

    When set to false, users can only scroll either horizontally or vertically at a time, preventing diagonal scrolling.

    Examples

    The following example demonstrates how to set the AllowDiagonalScrolling property in SfDataGrid.

    • XAML
    • C#
    <dataGrid:SfDataGrid AllowDiagonalScrolling="False" />
    sfDataGrid.AllowDiagonalScrolling = false;

    AllowDraggingColumn

    Gets or sets a value indicating whether to enable or disable the column dragging functionality in a SfDataGrid control. This is a bindable property

    Declaration
    [Cloneable(false)]
    public bool AllowDraggingColumn { get; set; }
    Property Value
    Type
    System.Boolean

    AllowDraggingRow

    Gets or sets a value indicating whether to enable/disable the row dragging functionality in a SfDataGrid control. SfDataGrid. This is a bindable property.

    Declaration
    [Cloneable(false)]
    public bool AllowDraggingRow { get; set; }
    Property Value
    Type
    System.Boolean

    AllowEditing

    Gets or sets a value indicating whether to enable/disable editing in runtime. SfDataGrid provides support for editing the cell values, when AllowEditing is set as true.

    Declaration
    public bool AllowEditing { get; set; }
    Property Value
    Type
    System.Boolean

    AllowGroupExpandCollapse

    Gets or sets a value indicating whether to allow expanding and collapsing of groups in SfDataGrid. By default, the groups will be in expanded state in SfDataGrid, when grouped. However, the user can expand or collapse a group in runtime by enabling this property.

    Declaration
    [Cloneable(false)]
    public bool AllowGroupExpandCollapse { get; set; }
    Property Value
    Type
    System.Boolean

    AllowKeyboardNavigation

    Gets or sets a System.Boolean value indicating whether to enable keyboard navigation in SfDataGrid. This is a bindable property.

    Declaration
    [Cloneable(false)]
    public bool AllowKeyboardNavigation { get; set; }
    Property Value
    Type
    System.Boolean
    Remarks

    Applicable only when the selection mode is not set to 'None'.

    AllowLoadMore

    Gets or sets a value that indicates whether to enable load more in SfDataGrid. This is a bindable property.

    Declaration
    [Cloneable(false)]
    public bool AllowLoadMore { get; set; }
    Property Value
    Type
    System.Boolean
    Examples
     
    dataGrid.AllowLoadMore = true; 
    dataGrid.LoadMoreCommand = new Command(ExecuteLoadMoreCommand); 
    
    private async void ExecuteLoadMoreCommand()
    { 
        this.dataGrid.IsBusy = true; 
        await Task.Delay(new TimeSpan(0, 0, 5));
        viewModel.LoadMoreItems(); 
        this.dataGrid.IsBusy = false;
    } 

    AllowPullToRefresh

    Gets or sets a value indicating whether to enable/disable the refreshing option upon pulling the grid.

    Declaration
    [Cloneable(false)]
    public bool AllowPullToRefresh { get; set; }
    Property Value
    Type
    System.Boolean

    AllowResizingColumns

    Declaration
    public bool AllowResizingColumns { get; set; }
    Property Value
    Type
    System.Boolean

    AllowSwiping

    Gets or sets a value that indicates whether swiping is enabled for the SfDataGrid control. This is a bindable property.

    Declaration
    [Cloneable(false)]
    public bool AllowSwiping { get; set; }
    Property Value
    Type Description
    System.Boolean

    A System.Boolean value that determines whether swiping is allowed. The default value is false.

    Remarks

    When set to true, this property enables row swiping in the SfDataGrid.

    Examples

    The following examples demonstrate how to set the AllowSwiping property:

    • XAML
    • C#
    <local:SfDataGrid AllowSwiping="True" />
    var dataGrid = new SfDataGrid
    {
        AllowSwiping = true
    };

    AllowTriStateSorting

    Gets or sets a value indicating whether user can sort the column in three states: ascending, descending, unsorted.

    Declaration
    public bool AllowTriStateSorting { get; set; }
    Property Value
    Type
    System.Boolean
    Remarks

    This is applicable only if the DataGridSortingMode is other than None.

    AlternationRowCount

    Gets or sets a row count to apply the background for the rows alternatively.

    Declaration
    [Cloneable(false)]
    public int AlternationRowCount { get; set; }
    Property Value
    Type
    System.Int32

    AutoExpandGroups

    Gets or sets a value indicating whether the SfDataGrid should auto expand groups when grouping. By enabling, this property, when the user group any column, then all groups will be in expanded state.

    Declaration
    [Cloneable(false)]
    public bool AutoExpandGroups { get; set; }
    Property Value
    Type
    System.Boolean

    AutoGenerateColumnsMode

    Gets or sets the AutoGenerateColumnsMode of SfDataGrid control. SfDataGrid decides columns generation based on the AutoGenerateColumnsMode property.

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

    The AutoGenerateColumnsMode of SfDataGrid. The default value is .

    Remarks

    The user can set the mode in which the columns should be generated by using the AutoGenerateColumnsMode property. The user can also customize the automatically generated column by using the AutoGeneratingColumn event. In order to include only the columns defined manually in the Columns collection, the user must set the None.

    AutoGenerateColumnsModeForCustomType

    Gets or sets the value that indicates how the complex type of properties should be auto-generated.

    Declaration
    [Cloneable(false)]
    public AutoGenerateColumnsModeForCustomType AutoGenerateColumnsModeForCustomType { get; set; }
    Property Value
    Type
    AutoGenerateColumnsModeForCustomType

    AutoGenerateRelations

    Gets or sets a value that indicates whether the relations for Master-Details View are generated automatically.

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

    true if relations are auto-generated; otherwise, false. The default value is false.

    Remarks

    You can cancel or customize the relation being created in the AutoGeneratingRelations event handler.

    Examples

    Here is an example of how to set the AutoGenerateRelations property.

    • XAML
    • C#
    <syncfusion:SfDataGrid AutoGenerateRelations="True">
    </syncfusion:SfDataGrid>
    var dataGrid = new SfDataGrid();
    dataGrid.AutoGenerateRelations = true;

    CanMaintainScrollPosition

    to do

    Declaration
    [Cloneable(false)]
    public bool CanMaintainScrollPosition { get; set; }
    Property Value
    Type
    System.Boolean

    CanUseViewFilter

    Gets or sets a value indicating whether to create a view by considering ICollectionView.Filter or DataView.RowFilter.

    Declaration
    [Cloneable(false)]
    public bool CanUseViewFilter { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if View needs to filter the rows using DataView.RowFilter expression or ICollectionView.Filter method; otherwise ,false. The default value is true

    CaptionSummaryRow

    Declaration
    [Cloneable(false)]
    public DataGridSummaryRow CaptionSummaryRow { get; set; }
    Property Value
    Type
    DataGridSummaryRow

    CaptionSummaryTemplate

    Declaration
    [Cloneable(false)]
    public DataTemplate CaptionSummaryTemplate { get; set; }
    Property Value
    Type
    Microsoft.Maui.Controls.DataTemplate

    CellDoubleTappedCommand

    Gets or sets the command to invoke when the cell is double tapped. This is a bindable property.

    Declaration
    [Cloneable(false)]
    public ICommand CellDoubleTappedCommand { get; set; }
    Property Value
    Type
    System.Windows.Input.ICommand

    CellDoubleTappedCommandParameter

    Gets or sets the parameter to pass to the CellDoubleTappedCommand. property. The default value is null. This is a bindable property.

    Declaration
    [Cloneable(false)]
    public object CellDoubleTappedCommandParameter { get; set; }
    Property Value
    Type
    System.Object

    CellEnteredCommand

    Gets or sets the command to invoke when the mouse is entered to the cell. This is a bindable property.

    Declaration
    [Cloneable(false)]
    public ICommand CellEnteredCommand { get; set; }
    Property Value
    Type
    System.Windows.Input.ICommand

    CellEnteredCommandParameter

    Gets or sets the parameter to pass to the CellEnteredCommand. property. The default value is null. This is a bindable property.

    Declaration
    [Cloneable(false)]
    public object CellEnteredCommandParameter { get; set; }
    Property Value
    Type
    System.Object

    CellExitedCommand

    Gets or sets the command to invoke when the mouse is exited from the cell. This is a bindable property.

    Declaration
    [Cloneable(false)]
    public ICommand CellExitedCommand { get; set; }
    Property Value
    Type
    System.Windows.Input.ICommand

    CellExitedCommandParameter

    Gets or sets the parameter to pass to the CellExitedCommand. property. The default value is null. This is a bindable property.

    Declaration
    [Cloneable(false)]
    public object CellExitedCommandParameter { get; set; }
    Property Value
    Type
    System.Object

    CellHoveredCommand

    Gets or sets the command to invoke when the mouse is hovering in the cell. This is a bindable property.

    Declaration
    [Cloneable(false)]
    public ICommand CellHoveredCommand { get; set; }
    Property Value
    Type
    System.Windows.Input.ICommand

    CellHoveredCommandParameter

    Gets or sets the parameter to pass to the CellHoveredCommand. property. The default value is null. This is a bindable property.

    Declaration
    [Cloneable(false)]
    public object CellHoveredCommandParameter { get; set; }
    Property Value
    Type
    System.Object

    CellLongPressCommand

    Gets or sets the command to invoke when the cell is long pressed. This is a bindable property.

    Declaration
    [Cloneable(false)]
    public ICommand CellLongPressCommand { get; set; }
    Property Value
    Type
    System.Windows.Input.ICommand

    CellLongPressCommandParameter

    Gets or sets the parameter to pass to the . property. The default value is null. This is a bindable property.

    Declaration
    [Cloneable(false)]
    public object CellLongPressCommandParameter { get; set; }
    Property Value
    Type
    System.Object

    CellRenderers

    Gets the GridCellRendererCollection that contains the cell renderers in SfDataGrid. The CellRenderers manages the creation of cells view objects when the cell is scrolled into view and also unloading of the views. Contains logics to place the UIElement inside cells in display and edit mode.

    Declaration
    public GridCellRendererCollection CellRenderers { get; }
    Property Value
    Type Description
    GridCellRendererCollection

    The collection containing the renderers in the SfDataGrid.

    Remarks

    The CellRenderers manages the creation of cells view objects when the cell is scrolled into view and also unloading of the views. Contains logics to place the UIElement inside cells in display and edit mode. The user can implement the renderer by extending it from the renderer he needs and customize the type of cell to be loaded for each column type in editing and normal mode.

    Note:When the user overrides the renderer, he needs to replace it in the CellRenderers collection. For example, if the user implements the class, to customize the cell in the , then he needs to replace it in the CellRenderers collection.

    CellRightTappedCommand

    Gets or sets the command to invoke when the cell is tapped by the secondary click. This is a bindable property.

    Declaration
    [Cloneable(false)]
    public ICommand CellRightTappedCommand { get; set; }
    Property Value
    Type
    System.Windows.Input.ICommand

    CellRightTappedCommandParameter

    Gets or sets the parameter to pass to the CellRightTappedCommand. property. The default value is null. This is a bindable property.

    Declaration
    [Cloneable(false)]
    public object CellRightTappedCommandParameter { get; set; }
    Property Value
    Type
    System.Object

    CellTappedCommand

    Gets or sets the command to invoke when the cell is tapped. This is a bindable property.

    Declaration
    [Cloneable(false)]
    public ICommand CellTappedCommand { get; set; }
    Property Value
    Type
    System.Windows.Input.ICommand

    CellTappedCommandParameter

    Gets or sets the parameter to pass to the CellTappedCommand. property. The default value is null. This is a bindable property.

    Declaration
    [Cloneable(false)]
    public object CellTappedCommandParameter { get; set; }
    Property Value
    Type
    System.Object

    Columns

    Gets or sets the Columns collection of the SfDataGrid. The Columns collection contains the columns in the SfDataGrid which are created for each property in the model class. The user can add the various column types to the SfDataGrid based on the requirement by specifying the MappingName which associates the property in the data source.

    Declaration
    [Cloneable(false)]
    public ColumnCollection Columns { get; set; }
    Property Value
    Type Description
    ColumnCollection

    The columns collection of the SfDataGrid.

    Remarks

    The Columns collection contains the columns in the SfDataGrid which are created for each property in the model class. SfDataGrid allows you to define the columns manually by adding the DataGridColumn objects to the Columns collection. There are different types of columns available in SfDataGrid and you can create any column based on your requirement.

    Examples
    List<GridColumn> myColumnsCollection = new List<GridColumn>();
    myColumnsCollection.Add(new DataGridTextColumn() { MappingName = "OrderID" });
    myColumnsCollection.Add(new DataGridTextColumn() { MappingName = "EmployeeID" });
    myColumnsCollection.Add(new DataGridTextColumn() { MappingName = "CustomerID" });
    dataGrid.Columns = myColumnsCollection;

    ColumnSizer

    Gets or sets the controller which controls the auto size calculation for column widths.

    Declaration
    [Cloneable(false)]
    public DataGridColumnSizer ColumnSizer { get; set; }
    Property Value
    Type
    DataGridColumnSizer

    ColumnWidthMode

    Gets or sets the value that indicates how all the columns` widths of the SfDataGrid are determined.

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

    The type of ColumnWidthMode that is applied to the SfDataGrid. The default value is .

    Remarks

    The user can specify how columns in the SfDataGrid are sized. SfDataGrid applies width for all the DataGridColumn in the Columns collection based on the ColumnWidthMode property.

    CurrentCell

    Gets or sets a cell coordinates which is currently navigated.

    Declaration
    [Cloneable(false)]
    public RowColumnIndex CurrentCell { get; set; }
    Property Value
    Type
    RowColumnIndex

    CurrentCellManager

    Gets or sets the DataGridCurrentCellManager which handles the current cell operations in SfDataGrid. This is a bindable property.

    Declaration
    [Cloneable(false)]
    public DataGridCurrentCellManager CurrentCellManager { get; set; }
    Property Value
    Type
    DataGridCurrentCellManager

    CurrentRow

    Gets or sets a row which is currently navigated.

    Declaration
    [Cloneable(false)]
    public object CurrentRow { get; set; }
    Property Value
    Type
    System.Object

    DataFetchSize

    Gets or sets the data fetch size for the Incremental Source. SfDataGrid supports incremental loading, the user can customize the size of data to be fetched in incremental loading by using DataFetchSize property.

    Declaration
    [Cloneable(false)]
    public int DataFetchSize { get; set; }
    Property Value
    Type Description
    System.Int32

    The size of the data to be fetched for the incremental source. The default value is 5.

    DefaultColumnWidth

    Gets or sets the default column width of the SfDataGrid. DataGridColumn renders in view based on the value of DefaultColumnWidth property in SfDataGrid.

    Declaration
    public double DefaultColumnWidth { get; set; }
    Property Value
    Type Description
    System.Double

    The default column width of the SfDataGrid. The default value is 100.

    Remarks

    Columns are arranged in view based on the DefaultColumnWidth property when the ColumnWidthMode is .

    DefaultStyle

    Gets or sets the style for the DataGrid. If it is null, the default style will be set.

    Declaration
    public DataGridStyle DefaultStyle { get; set; }
    Property Value
    Type
    DataGridStyle

    DetailsViewDefaultStyle

    Gets or sets the style applied to all the DetailsViewDataGrid.

    Declaration
    public DataGridStyle DetailsViewDefaultStyle { get; set; }
    Property Value
    Type Description
    DataGridStyle

    The style that is applied to all the DetailsViewDataGrid. The default value is null.

    Remarks

    To define a DataGridStyle for a DetailsViewDataGrid, specify a TargetType of DetailsViewDataGrid.

    Examples

    Here is an example of how to set the property.

    • XAML
    • C#
    <syncfusion:SfDataGrid>
        <syncfusion:SfDataGrid.DetailsViewDataGridStyle>
            <syncfusion:DataGridStyle BackgroundColor="LightGray" />
        </syncfusion:SfDataGrid.DetailsViewDataGridStyle>
    </syncfusion:SfDataGrid>
    var dataGrid = new SfDataGrid();
    dataGrid.DetailsViewDataGridStyle = new DataGridStyle { BackgroundColor = Colors.LightGray };

    DetailsViewDefinition

    Gets or sets the collection of ViewDefinition that enables you to represent the data in a hierarchical format.

    Declaration
    [Cloneable(false)]
    public DetailsViewDefinition DetailsViewDefinition { get; set; }
    Property Value
    Type Description
    DetailsViewDefinition

    The collection of ViewDefinition. The default value is null.

    Remarks

    The DetailsViewDefinition allows you to display child grids within the parent SfDataGrid. You can define multiple levels of hierarchy using DataGridViewDefinition.

    Examples

    Here is an example of how to define the DetailsViewDefinition in both XAML and C#.

    • XAML
    • C#
    <syncfusion:SfDataGrid.DetailsViewDefinition>
        <syncfusion:GridViewDefinition RelationalColumn="Sales">
            <syncfusion:GridViewDefinition.DataGrid>
                <syncfusion:SfDataGrid AutoGenerateRelations="True">   
                </syncfusion:SfDataGrid>
            </syncfusion:GridViewDefinition.DataGrid>
        </syncfusion:GridViewDefinition>
    </syncfusion:SfDataGrid.DetailsViewDefinition>
    var dataGrid = new SfDataGrid();
    var viewDefinition = new GridViewDefinition
    {
        RelationalColumn = "Sales",
        DataGrid = new SfDataGrid { AutoGenerateRelations = true }
    };
    
    dataGrid.DetailsViewDefinition = new DetailsViewDefinition { viewDefinition };

    DetailsViewPadding

    Gets or sets the padding of the DetailsViewDataGrid.

    Declaration
    [Cloneable(false)]
    public Thickness DetailsViewPadding { get; set; }
    Property Value
    Type Description
    Microsoft.Maui.Thickness

    The padding for the DetailsViewDataGrid.

    Remarks

    The DetailsViewPadding needs to be defined on its parent DataGrid when the child grid requires padding.

    Examples

    Here is an example of how to set the DetailsViewPadding property.

    • XAML
    • C#
    <syncfusion:SfDataGrid DetailsViewPadding="10, 10, 10, 10">
    </syncfusion:SfDataGrid>
    var dataGrid = new SfDataGrid();
    dataGrid.DetailsViewPadding = new Thickness(10, 10, 10, 10);

    EditTapAction

    Gets or sets the edit TapAction to enter edit mode in SfDataGrid. SfDataGrid provides support for editing the cell values, when AllowEditing is set as true.

    Declaration
    public DataGridTapAction EditTapAction { get; set; }
    Property Value
    Type
    DataGridTapAction

    EmptyView

    Gets or sets a content or view that will be displayed when there are no records in SfDataGrid

    Declaration
    [Cloneable(false)]
    public object EmptyView { get; set; }
    Property Value
    Type Description
    System.Object

    The Empty view’s type is object, so it accepts both string and view type values

    Remarks

    It helps to identify the items source is empty instead of showing a blank view.

    Examples

    Here is an example of how to set the EmptyView property.

    • XAML
    • XAML
    • C#
    <local:SfDataGrid EmptyView = "No records">
    
    </local:SfDataGrid>

    or

    <local:SfDataGrid>
        <loacl:SfDataGrid.EmptyView>
            <Label Text = "No records found" HorizontalTextAlignment="Center"/>
        </local:SfDataGrid.EmptyView>
    </local:SfDataGrid>
    dataGrid.EmptyView = "no records";

    EmptyViewTemplate

    Gets or sets a data template that will be displayed for empty view in SfDataGrid

    Declaration
    [Cloneable(false)]
    public DataTemplate EmptyViewTemplate { get; set; }
    Property Value
    Type Description
    Microsoft.Maui.Controls.DataTemplate

    It accepts the data template and template selector value.

    Remarks

    It helps to identify the items source is empty instead of showing a blank view.

    Examples

    Here is an example of how to set the EmptyViewTemplate property.

    • XAML
    • C#
    <local:SfDataGrid.EmptyViewTemplate>
        <DataTemplate>
            <Label Text = "No records"
                    VerticalOptions="CenterAndExpand"
                    FontSize="18" FontFamily="Roboto-Regular"/>
        </DataTemplate>
    </local:SfDataGrid.EmptyViewTemplate>
    var template = new DataTemplate(() =>
    {
        var stackLayout = new StackLayout();
        var label1 = new Label() { Text = "No records", FontSize = 40, HorizontalTextAlignment = TextAlignment.Center, };
        stackLayout.Children.Add(label1);
        return stackLayout;
    });
    
    dataGrid.EmptyViewTemplate = template;

    EnableDataVirtualization

    Gets or sets a value indicating whether to create RecordEntry for all the objects in SourceCollection while loading itself. By default RecordEntry created for all the objects of SourceCollection.

    Declaration
    [Cloneable(false)]
    public bool EnableDataVirtualization { get; set; }
    Property Value
    Type Description
    System.Boolean

    True to create RecordEntry only when try to access this index.

    Remarks

    If the SourceCollection is null then GetItemAt(Int32) used to populates the Records.

    Examples
    dataGrid.EnableDataVirtualization = true;

    ExpanderColumnWidth

    Gets or sets the expander column width.

    Declaration
    [Cloneable(false)]
    public double ExpanderColumnWidth { get; set; }
    Property Value
    Type
    System.Double
    Remarks

    Details view can be enabled by setting DetailsViewDefinition.

    FrozenColumnCount

    The number of non-scrolling columns at the left side of SfDataGrid

    Declaration
    [Cloneable(false)]
    public int FrozenColumnCount { get; set; }
    Property Value
    Type Description
    System.Int32

    The default value is 0.

    Remarks

    FrozenColumnCount value should be less than the number of columns displayed in the view. For example, if you have 5 columns in the view, you can set the FrozenColumnCount value to a maximum of 4.

    See Also
    FrozenRowCount

    FrozenRowCount

    The number of non-scrolling rows at the top of SfDataGrid

    Declaration
    [Cloneable(false)]
    public int FrozenRowCount { get; set; }
    Property Value
    Type Description
    System.Int32

    The default value is 0.

    Remarks

    FrozenRowCount value should be less than the number of rows displayed in the view. For example, if you have 10 rows in the view, you can set the FrozenRowCount value to a maximum of 9.

    See Also
    FrozenColumnCount

    GridLinesVisibility

    Gets or sets the visibility of the grid lines for the data rows.

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

    A GridLinesVisibility that represents whether the horizontal, vertial or both grid lines should be drawn. The default value is Horizontal.

    Remarks

    To customize the visibility of the grid lines of the header, you can use HeaderGridLinesVisibility.

    GroupCaptionTextFormat

    Gets or sets the group caption text format of the caption summary rows in SfDataGrid. Every group as a caption summary row, which is used to display the summary information in the caption of the group.SfDataGrid allows to customize the group caption text format by using this property.

    Declaration
    [Cloneable(false)]
    public string GroupCaptionTextFormat { get; set; }
    Property Value
    Type
    System.String

    GroupColumnDescriptions

    Gets or sets the GroupColumnDescriptions of the SfDataGrid. The user can get the columns that represent grouping from the GroupColumnDescriptions collection. SfDataGrid allows to perform grouping from the code by defining the GroupColumnDescription object and adding it in the GroupColumnDescriptions collection.

    Declaration
    [Cloneable(false)]
    public GroupColumnDescriptionCollection GroupColumnDescriptions { get; set; }
    Property Value
    Type
    GroupColumnDescriptionCollection

    GroupExpandCollapseTemplate

    Gets or Sets the GroupExpandCollapseTemplate

    Declaration
    [Cloneable(false)]
    public DataTemplate GroupExpandCollapseTemplate { get; set; }
    Property Value
    Type
    Microsoft.Maui.Controls.DataTemplate

    GroupingMode

    Gets or sets a value that indicates whether to allow multiple columns in SfDataGrid. By default, the last column gets grouped if multiple GroupColumnDescription are added. other GroupColumnDescriptions will be cleared.

    Declaration
    [Cloneable(false)]
    public GroupingMode GroupingMode { get; set; }
    Property Value
    Type
    GroupingMode

    GroupSummaryRows

    Declaration
    [Cloneable(false)]
    public ObservableCollection<DataGridSummaryRow> GroupSummaryRows { get; set; }
    Property Value
    Type
    System.Collections.ObjectModel.ObservableCollection<DataGridSummaryRow>

    GroupSummaryTemplate

    Declaration
    [Cloneable(false)]
    public DataTemplate GroupSummaryTemplate { get; set; }
    Property Value
    Type
    Microsoft.Maui.Controls.DataTemplate

    HeaderGridLinesVisibility

    Gets or sets the visibility of the grid lines for the column headers.

    Declaration
    public GridLinesVisibility HeaderGridLinesVisibility { get; set; }
    Property Value
    Type Description
    GridLinesVisibility

    A GridLinesVisibility that represents whether the horizontal, vertial or both grid lines should be drawn. The default value is Horizontal.

    Remarks

    To customize the visibility of the grid lines of the data rows, you can use GridLinesVisibility.

    HeaderRowHeight

    Gets or sets the height of a header row.

    Declaration
    public double HeaderRowHeight { get; set; }
    Property Value
    Type
    System.Double

    HorizontalScrollBarVisibility

    Gets or sets a value that controls when the horizontal scrollbar is visible.

    Declaration
    [Cloneable(false)]
    public ScrollBarVisibility HorizontalScrollBarVisibility { get; set; }
    Property Value
    Type
    Microsoft.Maui.ScrollBarVisibility
    Remarks

    This API is only available for the WinUI platform.

    IndentColumnWidth

    Gets or sets the width of the indent column.

    Declaration
    [Cloneable(false)]
    public double IndentColumnWidth { get; set; }
    Property Value
    Type
    System.Double

    IsBusy

    Declaration
    [Cloneable(false)]
    public bool IsBusy { get; set; }
    Property Value
    Type
    System.Boolean

    ItemsSource

    Gets or sets an external data source for SfDataGrid, to display the data in the grid. It supports the data sources such as System.Collections.Generic.List<>, System.Collections.ObjectModel.ObservableCollection<>, and so on. ItemsSource property helps to bind the SfDataGrid with the collection of objects.

    Declaration
    [Cloneable(false)]
    public object ItemsSource { get; set; }
    Property Value
    Type Description
    System.Object

    The items source of the SfDataGrid.

    Remarks

    To bind the SfDataGrid to data, set the ItemsSource property to an System.Collections.IEnumerable implementation. Each row in the datagrid is bound to an object in the data source, and each column in the data grid is bound to a property of the data object. In order to update the SfDataGrid user interface automatically when the items are added to or removed from the source data, the SfDataGrid must be bound to a collection that implements the System.Collections.Specialized.INotifyCollectionChanged interface, such as an System.Collections.ObjectModel.ObservableCollection<>. To automatically reflect property changes, the objects in the source collection must implement the System.ComponentModel.INotifyPropertyChanged interface.

    LeftSwipeTemplate

    Gets or sets the Microsoft.Maui.Controls.DataTemplate that is displayed when swiping a row from left to right. This is a bindable property.

    Declaration
    [Cloneable(false)]
    public DataTemplate LeftSwipeTemplate { get; set; }
    Property Value
    Type Description
    Microsoft.Maui.Controls.DataTemplate

    A Microsoft.Maui.Controls.DataTemplate that defines the content displayed during a left-to-right swipe. The default value is null.

    Remarks

    The LeftSwipeTemplate property allows customization of the content shown when a row is swiped in the left-to-right direction.

    Examples

    The following examples demonstrate how to set the LeftSwipeTemplate property:

    • XAML
    • C#
    <local:SfDataGrid AllowSwiping="True">
    <local:SfDataGrid.LeftSwipeTemplate>
        <DataTemplate>
            <Label BackgroundColor = "Yellow" Text="Left"/>
        </DataTemplate>
    </local:SfDataGrid.LeftSwipeTemplate>
    </local:SfDataGrid>
    var dataGrid = new SfDataGrid
    {
        AllowSwiping = true
    };
    dataGrid.LeftSwipeTemplate = new DataTemplate(() =>
    {
       var label = new Label()
       {
           Text = "LeftSwipe",
           BackgroundColor = Colors.SkyBlue
       };
       return label;
    });

    LiveDataUpdateMode

    to do

    Declaration
    [Cloneable(false)]
    public LiveDataUpdateMode LiveDataUpdateMode { get; set; }
    Property Value
    Type
    LiveDataUpdateMode

    LoadMoreCommand

    Declaration
    [Cloneable(false)]
    public ICommand LoadMoreCommand { get; set; }
    Property Value
    Type
    System.Windows.Input.ICommand

    LoadMorePosition

    Declaration
    [Cloneable(false)]
    public DataGridLoadMorePosition LoadMorePosition { get; set; }
    Property Value
    Type
    DataGridLoadMorePosition
    Examples
     
    dataGrid.LoadMorePosition = DataGridLoadMorePosition.Top; 

    LoadMoreText

    Declaration
    [Cloneable(false)]
    public string LoadMoreText { get; set; }
    Property Value
    Type
    System.String
    Examples
     
    dataGrid.LoadMoreText = "Load More Items"; 

    LoadMoreView

    Gets or sets the load more view that will be displayed when the vertical scrollbar is scrolled to the top or bottom position of SfDataGrid. This is a bindable property.

    Declaration
    [Cloneable(false)]
    public DataGridLoadMoreView LoadMoreView { get; set; }
    Property Value
    Type
    DataGridLoadMoreView
    Remarks

    The load more view will be displayed only when the AllowLoadMore property is enabled. The position of load more view can be customized by LoadMorePosition property.

    Examples
     
    dataGrid.LoadMoreView = new CustomLoadMoreView(); 
    
    public class CustomLoadMoreView : DataGridLoadMoreView 
    { 
    
    } 

    LostFocusBehavior

    Gets or sets a value that specifies the behavior of the DataGrid when it loses focus. This property is applicable only for DataGridTextColumn and DataGridNumericColumn.

    Declaration
    public DataGridLostFocusBehavior LostFocusBehavior { get; set; }
    Property Value
    Type Description
    DataGridLostFocusBehavior

    The default value is .

    Remarks

    This property is applicable only for DataGridTextColumn and DataGridNumericColumn.

    MaxSwipeOffset

    Gets or sets the maximum swipe threshold. This is a bindable property.

    Declaration
    [Cloneable(false)]
    public double MaxSwipeOffset { get; set; }
    Property Value
    Type Description
    System.Double

    A System.Double that defines the maximum swipe offset. The default value is 200.

    Remarks

    The MaxSwipeOffset property specifies the maximum distance a row can be swiped before the swipe action is considered complete.

    Examples

    The following examples demonstrate how to set the MaxSwipeOffset property:

    • XAML
    • C#
    <local:SfDataGrid AllowSwiping="True" MaxSwipeOffset = "100">
    </local:SfDataGrid>
    var dataGrid = new SfDataGrid
    {
        AllowSwiping = true,
        MaxSwipeOffset = 100
    };

    NavigationMode

    Gets or sets the value that indicates the navigation mode in the DataGrid.

    Declaration
    [Cloneable(false)]
    public DataGridNavigationMode NavigationMode { get; set; }
    Property Value
    Type Description
    DataGridNavigationMode

    A DataGridNavigationMode that represents whether the selection should be navihation based on cell or row. The default value is Cell.

    NotifyEventsToParentDataGrid

    Gets or sets a value that indicates whether to notify details view DataGrid or child data DataGrid events to the parent DataGrid. This allows event handling to be centralized in the parent DataGrid, eliminating the need to handle events at each hierarchical level.

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

    true if the child DataGrid notifies events to the parent DataGrid; otherwise, false. The default value is false.

    Examples

    Here is an example of how to set the NotifyEventsToParentDataGrid property.

    • XAML
    • C#
    <syncfusion:SfDataGrid.DetailsViewDefinition>
        <syncfusion:GridViewDefinition RelationalColumn="OrderDetails">
            <syncfusion:GridViewDefinition.DataGrid>
                <syncfusion:SfDataGrid x:Name="FirstDetailsViewGrid"
                                        NotifyEventsToParentDataGrid="True">
                </syncfusion:SfDataGrid>
            </syncfusion:GridViewDefinition.DataGrid>
        </syncfusion:GridViewDefinition>
    </syncfusion:SfDataGrid.DetailsViewDefinition>
    FirstDetailsViewGrid.NotifyEventsToParentDataGrid = true;

    PullToRefreshCommand

    Gets or sets the command to be executed when performing the pulling operation to refresh the grid. This command will be fired upon performing the pulling operation for doing the refreshing operation.

    Declaration
    [Cloneable(false)]
    public ICommand PullToRefreshCommand { get; set; }
    Property Value
    Type
    System.Windows.Input.ICommand

    ReuseRowsOnItemsSourceChange

    Gets or sets a value indicating whether to regenerate the rows or reuse the existing rows when the ItemsSource is changed at runtime.

    Declaration
    [Cloneable(false)]
    public bool ReuseRowsOnItemsSourceChange { get; set; }
    Property Value
    Type
    System.Boolean

    RightSwipeTemplate

    Gets or sets the Microsoft.Maui.Controls.DataTemplate that is displayed when swiping a row from right to left. This is a bindable property.

    Declaration
    [Cloneable(false)]
    public DataTemplate RightSwipeTemplate { get; set; }
    Property Value
    Type Description
    Microsoft.Maui.Controls.DataTemplate

    A Microsoft.Maui.Controls.DataTemplate that defines the content displayed during a right-to-left swipe. The default value is null.

    Remarks

    The RightSwipeTemplate property allows customization of the content shown when a row is swiped in the right-to-left direction.

    Examples

    The following examples demonstrate how to set the RightSwipeTemplate property:

    • XAML
    • C#
    <local:SfDataGrid AllowSwiping="True">
    <local:SfDataGrid.RightSwipeTemplate>
        <DataTemplate>
            <Label BackgroundColor = "Red" Text="Right"/>
        </DataTemplate>
    </local:SfDataGrid.RightSwipeTemplate>
    </local:SfDataGrid>
    var dataGrid = new SfDataGrid
    {
        AllowSwiping = true
    };
    dataGrid.RightSwipeTemplate = new DataTemplate(() =>
    {
       var label = new Label()
       {
           Text = "RightSwipe",
           BackgroundColor = Colors.Red
       };
       return label;
    });

    RowDragDropTemplate

    Gets or sets the view to be displayed when row drag and drop action is performed.

    Declaration
    [Cloneable(false)]
    public DataTemplate RowDragDropTemplate { get; set; }
    Property Value
    Type
    Microsoft.Maui.Controls.DataTemplate

    RowHeaderTemplate

    Gets or sets the template that is used to display the contents of a row header. This is a bindable property

    Declaration
    [Cloneable(false)]
    public DataTemplate RowHeaderTemplate { get; set; }
    Property Value
    Type
    Microsoft.Maui.Controls.DataTemplate

    RowHeaderWidth

    Gets or sets the width of the row header column which will be frozen at the left end of the view. This is a bindable property.

    Declaration
    [Cloneable(false)]
    public double RowHeaderWidth { get; set; }
    Property Value
    Type
    System.Double

    RowHeight

    Gets or sets the default height of the all the rows.

    Declaration
    public double RowHeight { get; set; }
    Property Value
    Type
    System.Double
    Remarks

    You can use the HeaderRowHeight property to set the height for header row. In order to fit the rows based on its cells content, use the QueryRowHeight event.

    SearchController

    Gets or sets the DataGridSearchController which handles the searching operations in . This is a bindable property.

    Declaration
    [Cloneable(false)]
    public DataGridSearchController SearchController { get; set; }
    Property Value
    Type
    DataGridSearchController

    SelectedDetailsViewDataGrid

    Gets or sets the DetailsViewDataGrid that is currently selected.

    Declaration
    [Cloneable(false)]
    public SfDataGrid SelectedDetailsViewDataGrid { get; set; }
    Property Value
    Type Description
    SfDataGrid

    Returns the selected details view DataGrid.

    Remarks

    You can access the properties and their values of the selected details view DataGrid through this property.

    Examples

    Here is an example of how to access the SelectedDetailsViewDataGrid property.

    • XAML
    • C#
    <syncfusion:SfDataGrid x:Name="dataGrid" />
    var selectedDetailsGrid = dataGrid.SelectedDetailsViewGrid;
    if (selectedDetailsGrid != null)
    {
        // Access properties of the selected details view grid
    }

    SelectedIndex

    Gets or sets an index of the currently selected row.

    Declaration
    [Cloneable(false)]
    public int SelectedIndex { get; set; }
    Property Value
    Type
    System.Int32

    SelectedRow

    Gets or sets a row which is currently selected.

    Declaration
    [Cloneable(false)]
    public object SelectedRow { get; set; }
    Property Value
    Type
    System.Object

    SelectedRows

    Gets or sets the collection of rows which are all selected.

    Declaration
    [Cloneable(false)]
    public ObservableCollection<object> SelectedRows { get; set; }
    Property Value
    Type
    System.Collections.ObjectModel.ObservableCollection<System.Object>

    SelectionController

    Gets or sets the DataGridSelectionController which handles the selection operations in SfDataGrid. This is a bindable property.

    Declaration
    [Cloneable(false)]
    public DataGridSelectionController SelectionController { get; set; }
    Property Value
    Type
    DataGridSelectionController

    SelectionMode

    Gets or sets a value that indicates how the selection should be applied.

    Declaration
    [Cloneable(false)]
    public DataGridSelectionMode SelectionMode { get; set; }
    Property Value
    Type Description
    DataGridSelectionMode

    A DataGridSelectionMode that represents whether the single, singledeselect and multiple should be applied for rows. The default value is None.

    SelectionUnit

    Gets or sets a value that indicates whether the rows, the cells or both the rows and cells are selectable in SfDataGrid.

    Declaration
    [Cloneable(false)]
    public DataGridSelectionUnit SelectionUnit { get; set; }
    Property Value
    Type
    DataGridSelectionUnit
    Remarks

    This property allows you to customize the selection behavior in the SfDataGrid. You can specify whether only rows, only cells, or both rows and cells can be selected.

    Examples

    Here is an example of how to set the DataGridSelectionUnit property

    • XAML
    • C#
    <local:SfDataGrid SelectionUnit="Cell" />
    var SfDataGrid = new SfDataGrid
    {
        SelectionUnit = DataGridSelectionUnit.Cell
    };      

    ShowColumnWhenGrouped

    Gets or sets a value indicating whether the column is displayed on DataGrid after it is grouped.

    Declaration
    [Cloneable(false)]
    public bool ShowColumnWhenGrouped { get; set; }
    Property Value
    Type
    System.Boolean

    ShowRowHeader

    Gets or sets a value indicating whether to include the row header or not. By default, nothing will be displayed in the row header. However, when RowHeaderTemplate property is set, the datagrid loads the given template as the content of the row header cells. This is a bindable property.

    Declaration
    [Cloneable(false)]
    public bool ShowRowHeader { get; set; }
    Property Value
    Type
    System.Boolean

    ShowSortNumbers

    Gets or sets a value indicating whether the sequence number should be displayed on the header cell of sorted column during multi-column sorting.

    Declaration
    public bool ShowSortNumbers { get; set; }
    Property Value
    Type
    System.Boolean

    SortColumnDescriptions

    Gets or sets the collection of the sort descriptions of column which are sorted.

    Declaration
    public SortColumnDescriptionCollection SortColumnDescriptions { get; set; }
    Property Value
    Type
    SortColumnDescriptionCollection

    SortComparers

    Gets or sets the collection of comparers to sort the columns in custom logic.

    Declaration
    public SortComparers SortComparers { get; }
    Property Value
    Type
    SortComparers

    SortIconTemplate

    Gets or Sets the SortIconTemplate

    Declaration
    public DataTemplate SortIconTemplate { get; set; }
    Property Value
    Type
    Microsoft.Maui.Controls.DataTemplate

    SortingGestureType

    Gets or sets a value that indicates how the sorting should be initiated.

    Declaration
    public DataGridSortingGestureType SortingGestureType { get; set; }
    Property Value
    Type Description
    DataGridSortingGestureType

    A DataGridSortingGestureType that represents whether the sorting should be applied on tap or double tap. The default value is Tap.

    SortingMode

    Gets or sets the value that indicates how the sorting should be applied.

    Declaration
    public DataGridSortingMode SortingMode { get; set; }
    Property Value
    Type Description
    DataGridSortingMode

    A DataGridSortingMode that represents whether the single or multiple columns should be sorted. The default value is None.

    SourceType

    Gets or sets the SourceType of the ItemsSource.

    Declaration
    [Cloneable(false)]
    public Type SourceType { get; set; }
    Property Value
    Type Description
    System.Type

    The type of the data source of SfDataGrid.

    StackedHeaderRows

    Gets or sets the collection of DataGridStackedHeaderRow to add additional headers to group the column headers.

    Declaration
    public ObservableCollection<DataGridStackedHeaderRow> StackedHeaderRows { get; set; }
    Property Value
    Type Description
    System.Collections.ObjectModel.ObservableCollection<DataGridStackedHeaderRow>

    The collection of DataGridStackedHeaderRow. The default value is null.

    Examples
     <syncfusion:SfDataGrid x:Name="dataGrid" AutoGenerateColumnsMode="None"         
      ItemsSource="{Binding Employees}">
     <syncfusion:SfDataGrid.StackedHeaderRows>
       <syncfusion:DataGridStackedHeaderRow>
           <syncfusion:DataGridStackedHeaderRow.Columns>
               <syncfusion:DataGridStackedColumn
                       ColumnMappingNames = "EmployeeID,Name"
                       Text="Employee Details"
                       />
           </syncfusion:DataGridStackedHeaderRow.Columns>
       </syncfusion:DataGridStackedHeaderRow>
     </syncfusion:SfDataGrid.StackedHeaderRows>
     <syncfusion:SfDataGrid.Columns>
      <syncfusion:DataGridTextColumn MappingName = "EmployeeID" />
       < syncfusion:DataGridTextColumn MappingName = "Name" />
       < syncfusion:DataGridTextColumn MappingName = "Title" />
     </ syncfusion:SfDataGrid.Columns>
    </syncfusion:SfDataGrid>
    SfDataGrid dataGrid = new SfDataGrid();
    dataGrid.AutoGenerateColumnsMode = AutoGenerateColumnsMode.None;
    dataGrid.Columns.Add(new DataGridTextColumn() { MappingName = "EmployeeID", HeaderText = "Employee ID" });
    dataGrid.Columns.Add(new DataGridTextColumn() { MappingName = "Name", HeaderText = "Name" });
    dataGrid.Columns.Add(new DataGridTextColumn() { MappingName = "Title", HeaderText = "Title" });
    var stackedHeaderRow = new DataGridStackedHeaderRow();
    stackedHeaderRow.Columns.Add(new DataGridStackedColumn()
    {
       ColumnMappingNames = "EmployeeID,Name",
       Text = "Employee Details",
    });
    dataGrid.StackedHeaderRows.Add(stackedHeaderRow);

    SummaryCalculationMode

    to do

    Declaration
    [Cloneable(false)]
    public CalculationMode SummaryCalculationMode { get; set; }
    Property Value
    Type
    CalculationMode

    SwipeOffsetMode

    Gets or sets the DataGridSwipeOffsetMode that determines whether to use the MaxSwipeOffset or the swipe view's content width to calculate the swipe threshold. This is a bindable property.

    Declaration
    [Cloneable(false)]
    public DataGridSwipeOffsetMode SwipeOffsetMode { get; set; }
    Property Value
    Type Description
    DataGridSwipeOffsetMode

    A DataGridSwipeOffsetMode that defines the swipe offset mode. The default value is Custom.

    Remarks

    The SwipeOffsetMode property specifies the method used to calculate the swipe threshold, either based on a custom value or automatically determined by the content width of the swipe view.

    Examples

    The following examples demonstrate how to set the SwipeOffsetMode property:

    • XAML
    • C#
    <local:SfDataGrid AllowSwiping="True" SwipeOffsetMode = "Auto">
    </local:SfDataGrid>
    var dataGrid = new SfDataGrid
    {
        AllowSwiping = true,
        SwipeOffsetMode = Auto
    };

    TableSummaryRows

    Gets or sets the collection of TableSummaryRows of the SfDataGrid. The table summary value is calculated based on all the records in SfDataGrid. SfDataGrid allows you to add multiple table summary rows either at top or bottom or at both positions

    Declaration
    public ObservableCollection<DataGridTableSummaryRow> TableSummaryRows { get; set; }
    Property Value
    Type Description
    System.Collections.ObjectModel.ObservableCollection<DataGridTableSummaryRow>

    The collection of DataGridTableSummaryRow of SfDataGrid.

    TableSummaryTemplate

    Gets or sets the template that is used to display the contents of a table summary. When this property is set, SfDataGrid loads the template as the content of the entire table summary row.

    Declaration
    [Cloneable(false)]
    public DataTemplate TableSummaryTemplate { get; set; }
    Property Value
    Type
    Microsoft.Maui.Controls.DataTemplate

    TransitionType

    Gets or sets a PullToRefreshTransitionType, decides the transition of progress indicator.

    Declaration
    [Cloneable(false)]
    public PullToRefreshTransitionType TransitionType { get; set; }
    Property Value
    Type
    PullToRefreshTransitionType

    UnboundRowCellRenderers

    Declaration
    [Cloneable(false)]
    public GridCellRendererCollection UnboundRowCellRenderers { get; }
    Property Value
    Type
    GridCellRendererCollection

    UnboundRows

    Gets or sets the collection of unbound rows that will be displayed to the SfDataGrid.

    Declaration
    public DataGridUnboundRows UnboundRows { get; set; }
    Property Value
    Type
    DataGridUnboundRows

    VerticalOverScrollMode

    Gets or sets a value indicating what effect should be applied when SfDataGrid is vertically over-scrolled.

    Declaration
    [Cloneable(false)]
    public DataGridVerticalOverScrollMode VerticalOverScrollMode { get; set; }
    Property Value
    Type Description
    DataGridVerticalOverScrollMode

    The VerticalOverScrollMode of SfDataGrid. The default value is for Android and for Ios.

    Remarks

    The VerticalOverScrollMode The property has no effect on desktop platforms, as they do not support bounce effects.

    Examples

    Here is an example of how to set the VerticalOverScrollMode property.

    • XAML
    • C#
    <syncfusion:SfDataGrid VerticalOverScrollMode="Bounce">
    </syncfusion:SfDataGrid>
    var dataGrid = new SfDataGrid();
    dataGrid.VerticalOverScrollMode = VerticalOverScrollMode.Bounce;

    VerticalScrollBarVisibility

    Gets or sets a value that controls when the vertical scrollbar is visible.

    Declaration
    [Cloneable(false)]
    public ScrollBarVisibility VerticalScrollBarVisibility { get; set; }
    Property Value
    Type
    Microsoft.Maui.ScrollBarVisibility
    Remarks

    This API is only available for the WinUI platform.

    View

    ToDo

    Declaration
    public ICollectionViewAdv View { get; }
    Property Value
    Type
    ICollectionViewAdv

    Methods

    ArrangeContent(Rect)

    ToDo

    Declaration
    protected override Size ArrangeContent(Rect bounds)
    Parameters
    Type Name Description
    Microsoft.Maui.Graphics.Rect bounds
    Returns
    Type
    Microsoft.Maui.Graphics.Size
    Overrides
    SfView.ArrangeContent(Rect)

    BeginEdit(Int32, Int32)

    Begins editing of the grid cell in the specified row and column index.

    Declaration
    public void BeginEdit(int rowIndex, int columnIndex)
    Parameters
    Type Name Description
    System.Int32 rowIndex

    The row index in which editing should be done.

    System.Int32 columnIndex

    The column index in which editing should be done.

    Remarks

    The user can edit the required cell programmatically by using this method, specifying the row and column index of the cell to be edited.

    CancelEdit()

    Cancels the editing of the grid cell which is currently being edited.

    Declaration
    public void CancelEdit()
    Remarks

    The user can cancel the editing in the current cell programmatically by using this method. Edited values will not be committed to the GridCell.

    CanHandleGesture(Object)

    Declaration
    public bool CanHandleGesture(object pullToRefresh)
    Parameters
    Type Name Description
    System.Object pullToRefresh
    Returns
    Type
    System.Boolean

    ClearSelection()

    Clears the selection in a SfDataGrid control.

    Declaration
    public void ClearSelection()

    CollapseAllDetailsView()

    Collapses all the DetailsViewDataGrids in SfDataGrid.

    Declaration
    public void CollapseAllDetailsView()

    CollapseAllGroups()

    Collapses all the groups in SfDataGrid.

    Declaration
    public void CollapseAllGroups()

    CollapseDetailsViewAt(Int32)

    Collapses the DetailsViewDataGrids corresponding to the specified record index.

    Declaration
    public void CollapseDetailsViewAt(int recordIndex)
    Parameters
    Type Name Description
    System.Int32 recordIndex

    Index of the record to collapse the Details View.

    CollapseGroup(Group)

    Collapses the specified group in SfDataGrid.

    Declaration
    public void CollapseGroup(Group group)
    Parameters
    Type Name Description
    Group group

    CollapseGroupsAtLevel(Int32)

    Collapses the group based on its level.

    Declaration
    public void CollapseGroupsAtLevel(int groupLevel)
    Parameters
    Type Name Description
    System.Int32 groupLevel

    EndEdit()

    Ends the editing of the grid cell which is currently being edited.

    Declaration
    public void EndEdit()

    ExpandAllDetailsView()

    Expands all the DetailsViewDataGrids in the SfDataGrid.

    Declaration
    public void ExpandAllDetailsView()

    ExpandAllDetailsView(Int32)

    Expands the DetailsViewDataGrid corresponding up to specified level.

    Declaration
    public void ExpandAllDetailsView(int level)
    Parameters
    Type Name Description
    System.Int32 level

    Specifies the level of the detailview.

    ExpandAllGroups()

    Expands all the groups in SfDataGrid.

    Declaration
    public void ExpandAllGroups()

    ExpandDetailsViewAt(Int32)

    Expands the DetailsViewDataGrid corresponding to the specified record index.

    Declaration
    public bool ExpandDetailsViewAt(int recordIndex)
    Parameters
    Type Name Description
    System.Int32 recordIndex

    Index of the record to expand the Details View.

    Returns
    Type Description
    System.Boolean

    Returns true if the record is expanded. otherwise false.

    ExpandGroup(Group)

    Expands the specified group in SfDataGrid.

    Declaration
    public void ExpandGroup(Group group)
    Parameters
    Type Name Description
    Group group

    ExpandGroupsAtLevel(Int32)

    Expands the group based on its level.

    Declaration
    public void ExpandGroupsAtLevel(int groupLevel)
    Parameters
    Type Name Description
    System.Int32 groupLevel

    GetRowGenerator()

    Gets the current instance of the Syncfusion.Maui.DataGrid.SfDataGrid.RowGenerator in a SfDataGrid.

    Declaration
    public RowGenerator GetRowGenerator()
    Returns
    Type
    RowGenerator

    GetSelectedCells()

    Gets the collection of selected cells in SfDataGrid.

    Declaration
    public List<SelectedCellInfo> GetSelectedCells()
    Returns
    Type Description
    System.Collections.Generic.List<SelectedCellInfo>

    Returns the collection of SelectedCellInfo that contains the selected cells in SfDataGrid.

    GetVisualContainer()

    Gets the Syncfusion.Maui.DataGrid.SfDataGrid.VisualContainer that processes the scrolling related operations in SfDataGrid.

    Declaration
    public VisualContainer GetVisualContainer()
    Returns
    Type
    VisualContainer

    InvalidateUnboundRow(DataGridUnboundRow, Boolean)

    Declaration
    public void InvalidateUnboundRow(DataGridUnboundRow unboundRow, bool canInvalidateColumn = true)
    Parameters
    Type Name Description
    DataGridUnboundRow unboundRow
    System.Boolean canInvalidateColumn

    MeasureContent(Double, Double)

    ToDo

    Declaration
    protected override Size MeasureContent(double widthConstraint, double heightConstraint)
    Parameters
    Type Name Description
    System.Double widthConstraint
    System.Double heightConstraint
    Returns
    Type
    Microsoft.Maui.Graphics.Size
    Overrides
    SfView.MeasureContent(Double, Double)

    MoveCurrentCellTo(RowColumnIndex, Boolean)

    Moves the currently focus cell to specified coordinates.

    Declaration
    public void MoveCurrentCellTo(RowColumnIndex rowColumnIndex, bool needToClearSelection = true)
    Parameters
    Type Name Description
    RowColumnIndex rowColumnIndex

    Specifies the corresponding row and column index to move the current cell to.

    System.Boolean needToClearSelection

    bool value that determines whether the currently selected rows should be removed when the current cell is moved.

    OnDraw(ICanvas, RectF)

    Declaration
    protected override void OnDraw(ICanvas canvas, RectF dirtyRect)
    Parameters
    Type Name Description
    Microsoft.Maui.Graphics.ICanvas canvas
    Microsoft.Maui.Graphics.RectF dirtyRect
    Overrides
    SfView.OnDraw(ICanvas, RectF)

    OnHandlerChanged()

    Invokes when the handler is changed in SfDataGrid

    Declaration
    protected override void OnHandlerChanged()
    Overrides
    SfView.OnHandlerChanged()

    OnPropertyChanged(String)

    Called when the property of DataGrid is changed.

    Declaration
    protected override void OnPropertyChanged(string propertyName = null)
    Parameters
    Type Name Description
    System.String propertyName

    RaiseQueryUnboundRow(DataGridUnboundRowEventArgs)

    Declaration
    protected DataGridUnboundRowEventArgs RaiseQueryUnboundRow(DataGridUnboundRowEventArgs args)
    Parameters
    Type Name Description
    DataGridUnboundRowEventArgs args
    Returns
    Type
    DataGridUnboundRowEventArgs

    Refresh()

    Refresh the SfDataGrid in runtime.

    Declaration
    public void Refresh()

    RefreshContainerAndView()

    Refreshes the container and entire view of the SfDataGrid.

    Declaration
    public virtual void RefreshContainerAndView()

    RefreshHeaderLineCount()

    Refreshes the header line count in the SfDataGrid.

    Declaration
    public virtual void RefreshHeaderLineCount()

    ResetSwipeOffset()

    This method resets the swipe offset of the SfDataGrid. It will programmatically reset the swiping offset when there is no need to maintain the swipe state after navigating to another page.

    Declaration
    public void ResetSwipeOffset()

    ResetUnboundRowIndex()

    Declaration
    protected void ResetUnboundRowIndex()

    RowColumnIndexToPoint(RowColumnIndex)

    Gets the point for the specified row column index in the given SfDataGrid.

    Declaration
    public Point RowColumnIndexToPoint(RowColumnIndex rowColumnIndex)
    Parameters
    Type Name Description
    RowColumnIndex rowColumnIndex
    Returns
    Type Description
    Microsoft.Maui.Graphics.Point

    The point corresponding to the given row column index.

    ScrollToColumnIndex(Int32, ScrollToPosition, Boolean)

    Scroll the SfDataGrid to the specified column index.

    Declaration
    public Task ScrollToColumnIndex(int columnIndex, ScrollToPosition scrollToColumnPosition, bool canAnimate = true)
    Parameters
    Type Name Description
    System.Int32 columnIndex

    The zero-based index of the column to scroll to.

    Microsoft.Maui.Controls.ScrollToPosition scrollToColumnPosition

    The position in the view to which the column should be scrolled. Default is Microsoft.Maui.Controls.ScrollToPosition.Start.

    System.Boolean canAnimate

    Indicates whether the scrolling should be animated. Default is true.

    Returns
    Type Description
    System.Threading.Tasks.Task

    Returns the task that performs the scrolling asynchronously.

    Remarks

    SfDataGrid supports programmatic scrolling. The user can scroll to the
    required column by using this method.

    See Also
    ScrollToRowIndex(Int32, ScrollToPosition, Boolean)
    ScrollToRowColumnIndex(Int32, Int32, ScrollToPosition, ScrollToPosition, Boolean)

    ScrollToRowColumnIndex(Int32, Int32, ScrollToPosition, ScrollToPosition, Boolean)

    Scroll the DataGrid to the specified row and column index.

    Declaration
    public Task ScrollToRowColumnIndex(int rowIndex, int columnIndex, ScrollToPosition scrollToRowPosition, ScrollToPosition scrollToColumnPosition, bool canAnimate = true)
    Parameters
    Type Name Description
    System.Int32 rowIndex

    The zero-based index of the row to scroll to.

    System.Int32 columnIndex

    The zero-based index of the column to scroll to.

    Microsoft.Maui.Controls.ScrollToPosition scrollToRowPosition

    The position in the view to which the row should be scrolled. Default is Microsoft.Maui.Controls.ScrollToPosition.Start.

    Microsoft.Maui.Controls.ScrollToPosition scrollToColumnPosition

    The position in the view to which the column should be scrolled. Default is Microsoft.Maui.Controls.ScrollToPosition.Start.

    System.Boolean canAnimate

    Indicates whether the scrolling should be animated. Default is true.

    Returns
    Type Description
    System.Threading.Tasks.Task

    Returns the task that performs the scrolling asynchronously.

    Remarks

    SfDataGrid supports programmatic scrolling. The user can scroll to the
    required row and column by using this method.

    See Also
    ScrollToColumnIndex(Int32, ScrollToPosition, Boolean)
    ScrollToRowIndex(Int32, ScrollToPosition, Boolean)

    ScrollToRowIndex(Int32, ScrollToPosition, Boolean)

    Scroll the DataGrid to the specified row index.

    Declaration
    public Task ScrollToRowIndex(int rowIndex, ScrollToPosition scrollToRowPosition, bool canAnimate = true)
    Parameters
    Type Name Description
    System.Int32 rowIndex

    The zero-based index of the column to scroll to.

    Microsoft.Maui.Controls.ScrollToPosition scrollToRowPosition

    The position in the view to which the row should be scrolled. Default is Microsoft.Maui.Controls.ScrollToPosition.Start.

    System.Boolean canAnimate

    Indicates whether the scrolling should be animated. Default is true.

    Returns
    Type Description
    System.Threading.Tasks.Task

    Returns the task that performs the scrolling asynchronously.

    Remarks

    SfDataGrid supports programmatic scrolling. The user can scroll to the
    required row by using this method.

    See Also
    ScrollToColumnIndex(Int32, ScrollToPosition, Boolean)
    ScrollToRowColumnIndex(Int32, Int32, ScrollToPosition, ScrollToPosition, Boolean)

    SelectAll()

    Selects all the cells in SfDataGrid when SelectionMode is Multiple.

    Declaration
    public void SelectAll()

    SelectCell(Object, DataGridColumn)

    Selects the cell that matches the specified row data and DataGridColumn.

    Declaration
    public void SelectCell(object rowData, DataGridColumn column)
    Parameters
    Type Name Description
    System.Object rowData
    DataGridColumn column

    SelectCells(Object, DataGridColumn, Object, DataGridColumn)

    Selects the range of cells that falls between the specified start/end row data and start/end DataGridColumn.

    Declaration
    public void SelectCells(object startRowData, DataGridColumn startColumn, object endRowData, DataGridColumn endColumn)
    Parameters
    Type Name Description
    System.Object startRowData

    The data of the first row in the range of cells to be selected.

    DataGridColumn startColumn

    The first DataGridColumn in the range of cells to be selected.

    System.Object endRowData

    The data of the last row in the range of cells to be selected.

    DataGridColumn endColumn

    The last DataGridColumn in the range of cells to be selected.

    Remarks

    This method is applicable only when SelectionMode is Multiple.

    Events

    AutoGeneratingColumn

    Occurs when column is generated for the properties from underlying data object.

    Declaration
    public event EventHandler<DataGridAutoGeneratingColumnEventArgs> AutoGeneratingColumn
    Event Type
    Type
    System.EventHandler<DataGridAutoGeneratingColumnEventArgs>

    AutoGeneratingRelations

    Occurs when the relations for Master-Details View is generated automatically.

    Declaration
    public event EventHandler<DataGridAutoGeneratingRelationsArgs> AutoGeneratingRelations
    Event Type
    Type
    System.EventHandler<DataGridAutoGeneratingRelationsArgs>

    CellDoubleTapped

    Occurs when the cell is tapped twice.

    Declaration
    public event EventHandler<DataGridCellDoubleTappedEventArgs> CellDoubleTapped
    Event Type
    Type
    System.EventHandler<DataGridCellDoubleTappedEventArgs>

    CellEntered

    Occurs when the mouse is entered to the cell.

    Declaration
    public event EventHandler<DataGridCellEnteredEventArgs> CellEntered
    Event Type
    Type
    System.EventHandler<DataGridCellEnteredEventArgs>

    CellExited

    Occurs when the mouse is exited from the cell.

    Declaration
    public event EventHandler<DataGridCellExitedEventArgs> CellExited
    Event Type
    Type
    System.EventHandler<DataGridCellExitedEventArgs>

    CellHovered

    Occurs when the mouse is hovered in the cell.

    Declaration
    public event EventHandler<DataGridCellHoveredEventArgs> CellHovered
    Event Type
    Type
    System.EventHandler<DataGridCellHoveredEventArgs>

    CellLongPress

    Occurs when the cell is long pressed for particular period.

    Declaration
    public event EventHandler<DataGridCellLongPressEventArgs> CellLongPress
    Event Type
    Type
    System.EventHandler<DataGridCellLongPressEventArgs>

    CellRightTapped

    Occurs when a cell in the data grid is right-clicked using the mouse.

    Declaration
    public event EventHandler<DataGridCellRightTappedEventArgs> CellRightTapped
    Event Type
    Type
    System.EventHandler<DataGridCellRightTappedEventArgs>
    Remarks

    This event is raised when the user performs a right-click action on a cell using the mouse. It is applicable only on the Windows and Mac Catalyst platforms.

    CellTapped

    Occurs when the cell is tapped.

    Declaration
    public event EventHandler<DataGridCellTappedEventArgs> CellTapped
    Event Type
    Type
    System.EventHandler<DataGridCellTappedEventArgs>

    CellValueChanged

    Occurs when the cell value is changed.

    Declaration
    public event EventHandler<DataGridCellValueChangedEventArgs> CellValueChanged
    Event Type
    Type
    System.EventHandler<DataGridCellValueChangedEventArgs>
    Remarks

    As of now, this event will be triggered for the DataGridCheckBoxColumn. This event won’t be triggered when you change the value of underlying data programmatically.

    ColumnResizing

    Occurs when a column's width is being resized in SfDataGrid.

    Declaration
    public event EventHandler<DataGridColumnResizingEventArgs> ColumnResizing
    Event Type
    Type
    System.EventHandler<DataGridColumnResizingEventArgs>

    CurrentCellActivated

    Occurs when the cell is activated on tapping or navigation.

    Declaration
    public event EventHandler<DataGridCurrentCellActivatedEventArgs> CurrentCellActivated
    Event Type
    Type
    System.EventHandler<DataGridCurrentCellActivatedEventArgs>

    CurrentCellActivating

    Occurs when the cell is being activated on tapping or navigation.

    Declaration
    public event EventHandler<DataGridCurrentCellActivatingEventArgs> CurrentCellActivating
    Event Type
    Type
    System.EventHandler<DataGridCurrentCellActivatingEventArgs>

    CurrentCellBeginEdit

    Occurs when the current cell enters into edit mode in SfDataGrid.

    Declaration
    public event EventHandler<DataGridCurrentCellBeginEditEventArgs> CurrentCellBeginEdit
    Event Type
    Type
    System.EventHandler<DataGridCurrentCellBeginEditEventArgs>

    CurrentCellDropDownSelectionChanged

    Occurs when the SelectedItem changed in the drop down of GridMultiColumnDropDownList or GridComboBoxColumn.

    Declaration
    public event EventHandler<CurrentCellDropDownSelectionChangedEventArgs> CurrentCellDropDownSelectionChanged
    Event Type
    Type
    System.EventHandler<CurrentCellDropDownSelectionChangedEventArgs>

    CurrentCellEndEdit

    Occurs when the current cell exists the edit mode in SfDataGrid.

    Declaration
    public event EventHandler<DataGridCurrentCellEndEditEventArgs> CurrentCellEndEdit
    Event Type
    Type
    System.EventHandler<DataGridCurrentCellEndEditEventArgs>

    DataGridLoaded

    Occurs when the SfDataGrid is loaded.

    Declaration
    public event EventHandler DataGridLoaded
    Event Type
    Type
    System.EventHandler

    DetailsViewCollapsed

    Occurs after the DetailsViewDataGrid is collapsed.

    Declaration
    public event EventHandler<DataGridDetailsViewCollapsedEventArgs> DetailsViewCollapsed
    Event Type
    Type
    System.EventHandler<DataGridDetailsViewCollapsedEventArgs>

    DetailsViewCollapsing

    Occurs when the DetailsViewDataGrid is being collapsed.

    Declaration
    public event EventHandler<DataGridDetailsViewCollapsingEventArgs> DetailsViewCollapsing
    Event Type
    Type
    System.EventHandler<DataGridDetailsViewCollapsingEventArgs>

    DetailsViewExpanded

    Occurs after the DetailsViewDataGrid is expanded.

    Declaration
    public event EventHandler<DataGridDetailsViewExpandedEventArgs> DetailsViewExpanded
    Event Type
    Type
    System.EventHandler<DataGridDetailsViewExpandedEventArgs>

    DetailsViewExpanding

    Occurs when the DetailsViewDataGrid is being expanded.

    Declaration
    public event EventHandler<DataGridDetailsViewExpandingEventArgs> DetailsViewExpanding
    Event Type
    Type
    System.EventHandler<DataGridDetailsViewExpandingEventArgs>

    DetailsViewLoading

    Occurs when the DetailsViewDataGrid is being loaded in to view.

    Declaration
    public event EventHandler<DataGridDetailsViewLoadingEventArgs> DetailsViewLoading
    Event Type
    Type
    System.EventHandler<DataGridDetailsViewLoadingEventArgs>

    DetailsViewUnloading

    Occurs when the DetailsViewDataGrid is being unloaded from the view.

    Declaration
    public event EventHandler<DataGridDetailsViewUnloadingEventArgs> DetailsViewUnloading
    Event Type
    Type
    System.EventHandler<DataGridDetailsViewUnloadingEventArgs>

    GroupCollapsed

    Occurs when a group is collapsed in SfDataGrid.

    Declaration
    public event EventHandler<DataGridColumnGroupChangedEventArgs> GroupCollapsed
    Event Type
    Type
    System.EventHandler<DataGridColumnGroupChangedEventArgs>

    GroupCollapsing

    Occurs when a group is being collapsed in SfDataGrid.

    Declaration
    public event EventHandler<DataGridColumnGroupChangingEventArgs> GroupCollapsing
    Event Type
    Type
    System.EventHandler<DataGridColumnGroupChangingEventArgs>

    GroupExpanded

    Occurs when a group is expanded in SfDataGrid.

    Declaration
    public event EventHandler<DataGridColumnGroupChangedEventArgs> GroupExpanded
    Event Type
    Type
    System.EventHandler<DataGridColumnGroupChangedEventArgs>

    GroupExpanding

    Occurs when a group is being expanded in SfDataGrid.

    Declaration
    public event EventHandler<DataGridColumnGroupChangingEventArgs> GroupExpanding
    Event Type
    Type
    System.EventHandler<DataGridColumnGroupChangingEventArgs>

    ItemsSourceChanged

    Occurs when the source is changed in the SfDataGrid.

    Declaration
    public event EventHandler<DataGridItemsSourceChangedEventArgs> ItemsSourceChanged
    Event Type
    Type
    System.EventHandler<DataGridItemsSourceChangedEventArgs>

    QueryColumnDragging

    Declaration
    public event EventHandler<DataGridQueryColumnDraggingEventArgs> QueryColumnDragging
    Event Type
    Type
    System.EventHandler<DataGridQueryColumnDraggingEventArgs>

    QueryRowDragging

    Occurs when a row is being reordering to the new position in SfDataGrid.

    Declaration
    public event EventHandler<DataGridQueryRowDraggingEventArgs> QueryRowDragging
    Event Type
    Type
    System.EventHandler<DataGridQueryRowDraggingEventArgs>

    QueryRowHeight

    Occurs when the height of the rows is queried.

    Declaration
    public event EventHandler<DataGridQueryRowHeightEventArgs> QueryRowHeight
    Event Type
    Type
    System.EventHandler<DataGridQueryRowHeightEventArgs>

    QueryUnboundColumnValue

    Occurs to query the values for DataGridUnboundColumn when the cells are initialized.

    Declaration
    public event EventHandler<DataGridUnboundColumnEventArgs> QueryUnboundColumnValue
    Event Type
    Type
    System.EventHandler<DataGridUnboundColumnEventArgs>

    QueryUnboundRow

    Occurs to query and commit the values to the unbound row.

    Declaration
    public event EventHandler<DataGridUnboundRowEventArgs> QueryUnboundRow
    Event Type
    Type
    System.EventHandler<DataGridUnboundRowEventArgs>
    Examples
    dataGrid.QueryUnboundRow += DataGrid_QueryUnboundRow;
    
    void DataGrid_QueryUnboundRow(object sender, DataGridUnboundRowEventArgs e)
    {
        if (e.DataGridUnboundAction == UnboundActions.QueryData)
        {
            if (e.RowColumnIndex.ColumnIndex == 0)
            {
                 e.Value = (dataGrid.CurrentItem as OrderInfo).OrderID;
                 e.Handled = true;
            }
        }
    }

    SelectionChanged

    Occurs when the selection is applied to rows.

    Declaration
    public event EventHandler<DataGridSelectionChangedEventArgs> SelectionChanged
    Event Type
    Type
    System.EventHandler<DataGridSelectionChangedEventArgs>

    SelectionChanging

    Occurs when the selection is being applied to rows.

    Declaration
    public event EventHandler<DataGridSelectionChangingEventArgs> SelectionChanging
    Event Type
    Type
    System.EventHandler<DataGridSelectionChangingEventArgs>

    SortColumnsChanged

    Occurs when column is sorted.

    Declaration
    public event EventHandler<DataGridSortColumnsChangedEventArgs> SortColumnsChanged
    Event Type
    Type
    System.EventHandler<DataGridSortColumnsChangedEventArgs>

    SortColumnsChanging

    Occurs when column is being sorted.

    Declaration
    public event EventHandler<DataGridSortColumnsChangingEventArgs> SortColumnsChanging
    Event Type
    Type
    System.EventHandler<DataGridSortColumnsChangingEventArgs>

    SwipeEnded

    Occurs when the swiping is ended in SfDataGrid.

    Declaration
    public event EventHandler<DataGridSwipeEndedEventArgs> SwipeEnded
    Event Type
    Type
    System.EventHandler<DataGridSwipeEndedEventArgs>
    Examples

    The following example demonstrates how to register and handle the SwipeEnded event:

    • C#
    SfDataGrid dataGrid = new SfDataGrid();
    dataGrid.SwipeEnded += DataGrid_SwipeEnded;
    
    private void DataGrid_SwipeEnded(object? sender, DataGridSwipeEndedEventArgs e)
    {
       // Retrieve additional information about the swipe.
       var rowData = e.RowData;
       var index = e.RowIndex;
       var offSet = e.SwipeOffset;
       var direction = e.SwipeDirection;
    }
    See Also
    SwipeStarting
    Swiping

    SwipeStarting

    Occurs when a swiping action starts in the SfDataGrid.

    Declaration
    public event EventHandler<DataGridSwipeStartingEventArgs> SwipeStarting
    Event Type
    Type
    System.EventHandler<DataGridSwipeStartingEventArgs>
    Examples

    Here is an example of how to register the SwipeStarting event.

    • C#
    SfDataGrid dataGrid = new SfDataGrid();
    dataGrid.SwipeStarting += DataGrid_SwipeStarting;
    
    private void DataGrid_SwipeStarting(object? sender, DataGridSwipeStartingEventArgs e)
    {
        // Optionally cancel the swipe operation.
       e.Cancel = false;
    
       // Retrieve additional information about the swipe.
       var rowData = e.RowData;
       var index = e.RowIndex;
       var offSet = e.SwipeOffset;
       var direction = e.SwipeDirection;
    }
    See Also
    Swiping
    SwipeEnded

    Swiping

    Occurs during an ongoing swipe action in the SfDataGrid.

    Declaration
    public event EventHandler<DataGridSwipingEventArgs> Swiping
    Event Type
    Type
    System.EventHandler<DataGridSwipingEventArgs>
    Examples

    The following example demonstrates how to register and handle the Swiping event:

    • C#
    SfDataGrid dataGrid = new SfDataGrid();
    dataGrid.Swiping += DataGrid_Swiping;
    
    private void DataGrid_Swiping(object? sender, DataGridSwipingEventArgs e)
    {
       // Retrieve additional information about the swipe.
       var rowData = e.RowData;
       var index = e.RowIndex;
       var offSet = e.SwipeOffset;
       var direction = e.SwipeDirection;
    }
    See Also
    SwipeStarting
    SwipeEnded

    ViewCreated

    Occurs when the view for a SfDataGrid is created.

    Declaration
    public event EventHandler ViewCreated
    Event Type
    Type
    System.EventHandler

    Implements

    IDrawableLayout
    Microsoft.Maui.Graphics.IDrawable
    Microsoft.Maui.IAbsoluteLayout
    Microsoft.Maui.ILayout
    Microsoft.Maui.IView
    Microsoft.Maui.IElement
    Microsoft.Maui.ITransform
    Microsoft.Maui.IContainer
    System.Collections.Generic.IList<>
    System.Collections.Generic.ICollection<>
    System.Collections.Generic.IEnumerable<>
    System.Collections.IEnumerable
    Microsoft.Maui.ISafeAreaView
    Microsoft.Maui.IPadding
    Microsoft.Maui.ICrossPlatformLayout
    Microsoft.Maui.IVisualTreeElement

    Extension Methods

    GridIndexResolver.ResolveToGroupRecordIndexForDetailsView(SfDataGrid, Int32)
    GridIndexResolver.IsInDetailsViewIndex(SfDataGrid, Int32)
    GridIndexResolver.GetDetailsViewRowIndex(SfDataGrid, DetailsViewDataGrid)
    GridIndexResolver.GetDetailsViewRecord(SfDataGrid, DetailsViewDataGrid)
    GridIndexResolver.ResolveToRecordIndex(SfDataGrid, Int32)
    GridIndexResolver.ResolveToRowIndex(SfDataGrid, Int32)
    GridIndexResolver.ResolveToStartRowIndex(SfDataGrid)
    GridIndexResolver.ResolveToGridVisibleColumnIndex(SfDataGrid, Int32)
    GridIndexResolver.ResolveToScrollColumnIndex(SfDataGrid, Int32)
    GridIndexResolver.ResolveToStartColumnIndex(SfDataGrid)
    GridIndexResolver.GetHeaderIndex(SfDataGrid)
    GridIndexResolver.IsUnboundRow(SfDataGrid, Int32)
    GridIndexResolver.ResolveStartIndexOfGroup(SfDataGrid, Group)
    GridIndexResolver.GetUnboundRowsCount(SfDataGrid, DataGridUnboundRowPosition, Boolean)
    GridIndexResolver.GetUnboundRowAtRowIndex(SfDataGrid, Int32)
    GridIndexResolver.ResolveUnboundRowToRowIndex(SfDataGrid, DataGridUnboundRow)
    GridIndexResolver.ResolveStartIndexBasedOnPosition(SfDataGrid)
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved