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.
Implements
Inherited Members
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
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 |
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.
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.
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.
EnableDataVirtualizationProperty
Bindable Property for EnableDataVirtualization
Declaration
public static readonly BindableProperty EnableDataVirtualizationProperty
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.
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.
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 |
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
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
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
public bool AllowDeleting { get; set; }
Property Value
Type |
---|
System.Boolean |
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
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
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
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
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
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
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
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 |
Remarks
When set to true
, this property enables row swiping in the SfDataGrid.
Examples
The following examples demonstrate how to set the AllowSwiping property:
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
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
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
public AutoGenerateColumnsModeForCustomType AutoGenerateColumnsModeForCustomType { get; set; }
Property Value
Type |
---|
AutoGenerateColumnsModeForCustomType |
CanMaintainScrollPosition
to do
Declaration
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
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
public DataGridSummaryRow CaptionSummaryRow { get; set; }
Property Value
Type |
---|
DataGridSummaryRow |
CaptionSummaryTemplate
Declaration
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
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
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
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
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
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
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
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
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
public ICommand CellLongPressCommand { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
CellLongPressCommandParameter
Gets or sets the parameter to pass to the
Declaration
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
CellRightTappedCommand
Gets or sets the command to invoke when the cell is tapped by the secondary click. This is a bindable property.
Declaration
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
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
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
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
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
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
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
public DataGridCurrentCellManager CurrentCellManager { get; set; }
Property Value
Type |
---|
DataGridCurrentCellManager |
CurrentRow
Gets or sets a row which is currently navigated.
Declaration
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
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 |
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 |
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
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;
FrozenColumnCount
The number of non-scrolling columns at the left side of SfDataGrid
Declaration
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
The number of non-scrolling rows at the top of SfDataGrid
Declaration
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
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
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
public GroupColumnDescriptionCollection GroupColumnDescriptions { get; set; }
Property Value
Type |
---|
GroupColumnDescriptionCollection |
GroupExpandCollapseTemplate
Gets or Sets the GroupExpandCollapseTemplate
Declaration
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
public GroupingMode GroupingMode { get; set; }
Property Value
Type |
---|
GroupingMode |
GroupSummaryRows
Declaration
public ObservableCollection<DataGridSummaryRow> GroupSummaryRows { get; set; }
Property Value
Type |
---|
System.Collections.ObjectModel.ObservableCollection<DataGridSummaryRow> |
GroupSummaryTemplate
Declaration
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
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
public double IndentColumnWidth { get; set; }
Property Value
Type |
---|
System.Double |
IsBusy
Declaration
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
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
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 |
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:
<local:SfDataGrid AllowSwiping="True">
<local:SfDataGrid.LeftSwipeTemplate>
<DataTemplate>
<Label BackgroundColor = "Yellow" Text="Left"/>
</DataTemplate>
</local:SfDataGrid.LeftSwipeTemplate>
</local:SfDataGrid>
LiveDataUpdateMode
to do
Declaration
public LiveDataUpdateMode LiveDataUpdateMode { get; set; }
Property Value
Type |
---|
LiveDataUpdateMode |
LoadMoreCommand
Declaration
public ICommand LoadMoreCommand { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
LoadMorePosition
Declaration
public DataGridLoadMorePosition LoadMorePosition { get; set; }
Property Value
Type |
---|
DataGridLoadMorePosition |
Examples
dataGrid.LoadMorePosition = DataGridLoadMorePosition.Top;
LoadMoreText
Declaration
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
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
public double MaxSwipeOffset { get; set; }
Property Value
Type | Description |
---|---|
System.Double | A System.Double that defines the maximum swipe offset. The default value is |
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:
NavigationMode
Gets or sets the value that indicates the navigation mode in the DataGrid.
Declaration
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. |
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
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
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
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 |
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:
<local:SfDataGrid AllowSwiping="True">
<local:SfDataGrid.RightSwipeTemplate>
<DataTemplate>
<Label BackgroundColor = "Red" Text="Right"/>
</DataTemplate>
</local:SfDataGrid.RightSwipeTemplate>
</local:SfDataGrid>
RowDragDropTemplate
Gets or sets the view to be displayed when row drag and drop action is performed.
Declaration
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
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
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.
SelectedIndex
Gets or sets an index of the currently selected row.
Declaration
public int SelectedIndex { get; set; }
Property Value
Type |
---|
System.Int32 |
SelectedRow
Gets or sets a row which is currently selected.
Declaration
public object SelectedRow { get; set; }
Property Value
Type |
---|
System.Object |
SelectedRows
Gets or sets the collection of rows which are all selected.
Declaration
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
public DataGridSelectionController SelectionController { get; set; }
Property Value
Type |
---|
DataGridSelectionController |
SelectionMode
Gets or sets a value that indicates how the selection should be applied.
Declaration
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
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
ShowColumnWhenGrouped
Gets or sets a value indicating whether the column is displayed on DataGrid after it is grouped.
Declaration
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
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
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
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
public DataGridSwipeOffsetMode SwipeOffsetMode { get; set; }
Property Value
Type | Description |
---|---|
DataGridSwipeOffsetMode | A DataGridSwipeOffsetMode that defines the swipe offset mode. The default value is |
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:
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
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
public PullToRefreshTransitionType TransitionType { get; set; }
Property Value
Type |
---|
PullToRefreshTransitionType |
UnboundRowCellRenderers
Declaration
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 |
VerticalScrollBarVisibility
Gets or sets a value that controls when the vertical scrollbar is visible.
Declaration
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
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()
CollapseAllGroups()
Collapses all the groups in SfDataGrid.
Declaration
public void CollapseAllGroups()
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()
ExpandAllGroups()
Expands all the groups in SfDataGrid.
Declaration
public void ExpandAllGroups()
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
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
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 void RefreshContainerAndView()
RefreshHeaderLineCount()
Refreshes the header line count in the SfDataGrid.
Declaration
public 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
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
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
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> |
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 |
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:
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
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.
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
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:
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
ViewCreated
Occurs when the view for a SfDataGrid is created.
Declaration
public event EventHandler ViewCreated
Event Type
Type |
---|
System.EventHandler |