ClassRadDataGrid
Represents a high-performance data grid control for .NET MAUI applications that provides comprehensive functionality for displaying and manipulating tabular data. The RadDataGrid offers efficient data visualization with advanced features for sorting, filtering, grouping, and editing.
Definition
Namespace:Telerik.Maui.Controls
Assembly:Telerik.Maui.Controls.dll
Syntax:
public class RadDataGrid : RadLayout, ICommandService
Inheritance: objectRadLayoutRadDataGrid
Derived Classes:
Implements:
Inherited Members
Constructors
RadDataGrid()
Initializes a new instance of the RadDataGrid class.
Declaration
public RadDataGrid()
Fields
AlternateRowBackgroundStyleProperty
Identifies the AlternateRowBackgroundStyle property.
Declaration
public static readonly BindableProperty AlternateRowBackgroundStyleProperty
Field Value
BindableProperty
ApplyDataOperationsOnPropertyChangeProperty
Identifies the ApplyDataOperationsOnPropertyChange dependency property.
Declaration
public static readonly BindableProperty ApplyDataOperationsOnPropertyChangeProperty
Field Value
BindableProperty
AreGroupHeadersClippedWhenFrozenProperty
Identifies the AreGroupHeadersClippedWhenFrozen property.
Declaration
public static readonly BindableProperty AreGroupHeadersClippedWhenFrozenProperty
Field Value
BindableProperty
AreRowDetailsFrozenProperty
Identifies the AreRowDetailsFrozen property.
Declaration
public static readonly BindableProperty AreRowDetailsFrozenProperty
Field Value
BindableProperty
AutoExpandGroupsProperty
Identifies the AutoExpandGroups property.
Declaration
public static readonly BindableProperty AutoExpandGroupsProperty
Field Value
BindableProperty
AutoGenerateColumnsProperty
Identifies the AutoGenerateColumns dependency property.
Declaration
public static readonly BindableProperty AutoGenerateColumnsProperty
Field Value
BindableProperty
BorderBrushProperty
Identifies the BorderBrush property.
Declaration
public static readonly BindableProperty BorderBrushProperty
Field Value
BindableProperty
BorderThicknessProperty
Identifies the BorderThickness property.
Declaration
public static readonly BindableProperty BorderThicknessProperty
Field Value
BindableProperty
CanUserExpandMultipleRowDetailsProperty
Identifies the CanUserExpandMultipleRowDetails property.
Declaration
public static readonly BindableProperty CanUserExpandMultipleRowDetailsProperty
Field Value
BindableProperty
CanUserReorderColumnsProperty
Identifies the CanUserReorderColumns property.
Declaration
public static readonly BindableProperty CanUserReorderColumnsProperty
Field Value
BindableProperty
CanUserResizeColumnsProperty
Identifies the CanUserResizeColumns property.
Declaration
public static readonly BindableProperty CanUserResizeColumnsProperty
Field Value
BindableProperty
ColumnHeaderDragVisualTemplateProperty
Identifies the ColumnHeaderDragVisualTemplate property.
Declaration
public static readonly BindableProperty ColumnHeaderDragVisualTemplateProperty
Field Value
BindableProperty
ColumnReorderIndicatorTemplateProperty
Identifies the ColumnReorderIndicatorTemplate property.
Declaration
public static readonly BindableProperty ColumnReorderIndicatorTemplateProperty
Field Value
BindableProperty
CurrentCellProperty
Identifies the CurrentCell property.
Declaration
public static readonly BindableProperty CurrentCellProperty
Field Value
BindableProperty
CurrentCellStyleProperty
Identifies the CurrentCellStyle property.
Declaration
public static readonly BindableProperty CurrentCellStyleProperty
Field Value
BindableProperty
DataOperationIndicationModeProperty
Identifies the DataOperationIndicationMode property.
Declaration
public static readonly BindableProperty DataOperationIndicationModeProperty
Field Value
BindableProperty
DraggedObjectProperty
Identifies the DraggedObject property.
Declaration
public static readonly BindableProperty DraggedObjectProperty
Field Value
BindableProperty
EmptyContentDisplayModeProperty
Identifies the EmptyContentDisplayMode property.
Declaration
public static readonly BindableProperty EmptyContentDisplayModeProperty
Field Value
BindableProperty
EmptyContentTemplateProperty
Identifies the EmptyContentTemplate property.
Declaration
public static readonly BindableProperty EmptyContentTemplateProperty
Field Value
BindableProperty
ExpandedRowDetailsProperty
Identifies the ExpandedRowDetails property.
Declaration
public static readonly BindableProperty ExpandedRowDetailsProperty
Field Value
BindableProperty
FilterDescriptorsProperty
Identifies the FilterDescriptors dependency property.
Declaration
public static readonly BindableProperty FilterDescriptorsProperty
Field Value
BindableProperty
FrozenColumnsSplitterStyleProperty
Identifies the FrozenColumnsSplitterStyle property.
Declaration
public static readonly BindableProperty FrozenColumnsSplitterStyleProperty
Field Value
BindableProperty
GridLinesColorProperty
Identifies the GridLinesColor property.
Declaration
public static readonly BindableProperty GridLinesColorProperty
Field Value
BindableProperty
GridLinesThicknessProperty
Identifies the GridLinesThickness property.
Declaration
public static readonly BindableProperty GridLinesThicknessProperty
Field Value
BindableProperty
GridLinesVisibilityProperty
Identifies the GridLinesVisibility property.
Declaration
public static readonly BindableProperty GridLinesVisibilityProperty
Field Value
BindableProperty
GroupAggregateCellStyleProperty
Identifies the GroupAggregateCellStyle property.
Declaration
public static readonly BindableProperty GroupAggregateCellStyleProperty
Field Value
BindableProperty
GroupAggregateCellStyleSelectorProperty
Identifies the GroupAggregateCellStyleSelector property.
Declaration
public static readonly BindableProperty GroupAggregateCellStyleSelectorProperty
Field Value
BindableProperty
GroupAggregateCellTemplateProperty
Identifies the GroupAggregateCellTemplate property.
Declaration
public static readonly BindableProperty GroupAggregateCellTemplateProperty
Field Value
BindableProperty
GroupAggregatesAlignmentProperty
Identifies the GroupAggregatesAlignment dependency property.
Declaration
public static readonly BindableProperty GroupAggregatesAlignmentProperty
Field Value
BindableProperty
GroupDescriptorsProperty
Identifies the GroupDescriptors dependency property.
Declaration
public static readonly BindableProperty GroupDescriptorsProperty
Field Value
BindableProperty
GroupFooterStyleProperty
Identifies the GroupFooterStyle property.
Declaration
public static readonly BindableProperty GroupFooterStyleProperty
Field Value
BindableProperty
GroupFooterStyleSelectorProperty
Identifies the GroupFooterStyleSelector property.
Declaration
public static readonly BindableProperty GroupFooterStyleSelectorProperty
Field Value
BindableProperty
GroupFooterTemplateProperty
Identifies the GroupFooterTemplate property.
Declaration
public static readonly BindableProperty GroupFooterTemplateProperty
Field Value
BindableProperty
GroupHeaderStyleProperty
Identifies the GroupHeaderStyle property.
Declaration
public static readonly BindableProperty GroupHeaderStyleProperty
Field Value
BindableProperty
GroupHeaderStyleSelectorProperty
Identifies the GroupHeaderStyleSelector property.
Declaration
public static readonly BindableProperty GroupHeaderStyleSelectorProperty
Field Value
BindableProperty
GroupHeaderTemplateProperty
Identifies the GroupHeaderTemplate property.
Declaration
public static readonly BindableProperty GroupHeaderTemplateProperty
Field Value
BindableProperty
GroupHeaderTemplateSelectorProperty
Identifies the GroupHeaderTemplateSelector property.
Declaration
public static readonly BindableProperty GroupHeaderTemplateSelectorProperty
Field Value
BindableProperty
GroupingPanelItemTemplateProperty
Identifies the GroupingPanelItemTemplate property.
Declaration
public static readonly BindableProperty GroupingPanelItemTemplateProperty
Field Value
BindableProperty
IsBusyProperty
Identifies the IsBusy property.
Declaration
public static readonly BindableProperty IsBusyProperty
Field Value
BindableProperty
ItemsSourceProperty
Identifies the ItemsSource dependency property.
Declaration
public static readonly BindableProperty ItemsSourceProperty
Field Value
BindableProperty
ListenForNestedPropertyChangeProperty
Identifies the ListenForNestedPropertyChange property.
Declaration
public static readonly BindableProperty ListenForNestedPropertyChangeProperty
Field Value
BindableProperty
LoadOnDemandAutoTemplateProperty
Identifies the LoadOnDemandAutoTemplate property.
Declaration
public static readonly BindableProperty LoadOnDemandAutoTemplateProperty
Field Value
BindableProperty
LoadOnDemandBufferItemsCountProperty
Identifies the LoadOnDemandBufferItemsCount property.
Declaration
public static readonly BindableProperty LoadOnDemandBufferItemsCountProperty
Field Value
BindableProperty
LoadOnDemandModeProperty
Identifies the LoadOnDemandMode property.
Declaration
public static readonly BindableProperty LoadOnDemandModeProperty
Field Value
BindableProperty
LoadOnDemandRowStyleProperty
Identifies the LoadOnDemandRowStyle property.
Declaration
public static readonly BindableProperty LoadOnDemandRowStyleProperty
Field Value
BindableProperty
LoadOnDemandRowTemplateProperty
Identifies the LoadOnDemandRowTemplate property.
Declaration
public static readonly BindableProperty LoadOnDemandRowTemplateProperty
Field Value
BindableProperty
MouseHoverStyleProperty
Identifies the MouseHoverStyle property.
Declaration
public static readonly BindableProperty MouseHoverStyleProperty
Field Value
BindableProperty
RenderModeProperty
Identifies the RenderMode property.
Declaration
public static readonly BindableProperty RenderModeProperty
Field Value
BindableProperty
RowBackgroundStyleProperty
Identifies the RowBackgroundStyle property.
Declaration
public static readonly BindableProperty RowBackgroundStyleProperty
Field Value
BindableProperty
RowBackgroundStyleSelectorProperty
Identifies the RowBackgroundStyleSelector property.
Declaration
public static readonly BindableProperty RowBackgroundStyleSelectorProperty
Field Value
BindableProperty
RowDetailsTemplateProperty
Identifies the RowDetailsTemplate property.
Declaration
public static readonly BindableProperty RowDetailsTemplateProperty
Field Value
BindableProperty
RowHeightProperty
Identifies the RowHeight property.
Declaration
public static readonly BindableProperty RowHeightProperty
Field Value
BindableProperty
SearchPanelProperty
Identifies the SearchPanel property.
Declaration
public static readonly BindableProperty SearchPanelProperty
Field Value
BindableProperty
SearchSettingsProperty
Identifies the SearchSettings property.
Declaration
public static readonly BindableProperty SearchSettingsProperty
Field Value
BindableProperty
SelectedItemProperty
Identifies the SelectedItem property.
Declaration
public static readonly BindableProperty SelectedItemProperty
Field Value
BindableProperty
SelectedItemsProperty
Identifies the SelectedItems property.
Declaration
public static readonly BindableProperty SelectedItemsProperty
Field Value
BindableProperty
SelectionModeProperty
Identifies the SelectionMode property.
Declaration
public static readonly BindableProperty SelectionModeProperty
Field Value
BindableProperty
SelectionStyleProperty
Identifies the SelectionStyle property.
Declaration
public static readonly BindableProperty SelectionStyleProperty
Field Value
BindableProperty
SelectionUnitProperty
Identifies the SelectionUnit property.
Declaration
public static readonly BindableProperty SelectionUnitProperty
Field Value
BindableProperty
ServicePanelProperty
Identifies the ServicePanel property.
Declaration
public static readonly BindableProperty ServicePanelProperty
Field Value
BindableProperty
ShowColumnFootersProperty
Identifies the ShowColumnFooters dependency property.
Declaration
public static readonly BindableProperty ShowColumnFootersProperty
Field Value
BindableProperty
ShowGroupFootersProperty
Identifies the ShowGroupFooters dependency property.
Declaration
public static readonly BindableProperty ShowGroupFootersProperty
Field Value
BindableProperty
ShowGroupHeaderAggregatesProperty
Identifies the ShowGroupHeaderAggregates dependency property.
Declaration
public static readonly BindableProperty ShowGroupHeaderAggregatesProperty
Field Value
BindableProperty
SortDescriptorsProperty
Identifies the SortDescriptors dependency property.
Declaration
public static readonly BindableProperty SortDescriptorsProperty
Field Value
BindableProperty
UserEditModeProperty
Identifies the UserEditMode property.
Declaration
public static readonly BindableProperty UserEditModeProperty
Field Value
BindableProperty
UserFilterModeProperty
Identifies the UserFilterMode property.
Declaration
public static readonly BindableProperty UserFilterModeProperty
Field Value
BindableProperty
UserGroupModeProperty
Identifies the UserGroupMode dependency property.
Declaration
public static readonly BindableProperty UserGroupModeProperty
Field Value
BindableProperty
UserSortModeProperty
Identifies the UserSortMode dependency property.
Declaration
public static readonly BindableProperty UserSortModeProperty
Field Value
BindableProperty
ViewportBufferHeightProperty
Identifies the ViewportBufferHeight property.
Declaration
public static readonly BindableProperty ViewportBufferHeightProperty
Field Value
BindableProperty
Properties
AlternateRowBackgroundStyle
Gets or sets the Style that defines the appearance of an alternate row. The Style should target DataGridRowBackgroundAppearance.
Declaration
public Style AlternateRowBackgroundStyle { get; set; }
Property Value
Style
ApplyDataOperationsOnPropertyChange
Gets or sets a value indicating whether the operations (sorting, filtering, grouping) should be applied when PropertyChanged event is raised.
Declaration
public bool ApplyDataOperationsOnPropertyChange { get; set; }
Property Value
AreGroupHeadersClippedWhenFrozen
Gets or sets a value indicating whether the group header should be clipped to the bounds of the frozen area when there are frozen columns.
Declaration
public bool AreGroupHeadersClippedWhenFrozen { get; set; }
Property Value
AreRowDetailsFrozen
Gets or sets a value indicating whether or not the row details are frozen, i.e. they retain position during horizontal scroll.
AutoExpandGroups
Gets or sets a value indicating whether newly added groups should be automatically expanded.
AutoGenerateColumns
Gets or sets a value indicating whether grid's columns will be auto-generated from the provided ViewModel's properties.
BorderBrush
Gets or sets the Brush of the border placed around the RadDataGrid control.
Declaration
public Brush BorderBrush { get; set; }
Property Value
Brush
BorderThickness
Gets or sets the thickness of the border placed around the RadDataGrid control.
Declaration
public Thickness BorderThickness { get; set; }
Property Value
Thickness
CanUserExpandMultipleRowDetails
Gets or sets a value indicating whether multiple row details can be expanded.
Declaration
public bool CanUserExpandMultipleRowDetails { get; set; }
Property Value
CanUserReorderColumns
Gets or sets a value indicating whether the user can reorder the DataGridColumns in the RadDataGrid.
CanUserResizeColumns
Gets or sets a value indicating whether the user can resize all DataGridColumns. This is only suppoted in WinUI and MacCatalyst.
ColumnHeaderDragVisualTemplate
Gets or sets the template that presents the drag visual of the dragged column header.
Declaration
public DataTemplate ColumnHeaderDragVisualTemplate { get; set; }
Property Value
DataTemplate
ColumnReorderIndicatorTemplate
Gets or sets the template that presents the indicator that is shown between two columns during reordering.
Declaration
public DataTemplate ColumnReorderIndicatorTemplate { get; set; }
Property Value
DataTemplate
Columns
Gets the collection of DataGridColumn objects currently displayed within the grid.
Declaration
public DataGridColumnCollection Columns { get; }
Property Value
CommandService
Gets the DataGridCommandService instance that manages the commanding behavior of this instance.
Declaration
public DataGridCommandService CommandService { get; }
Property Value
Implements
Remarks
The CommandService provides programmatic access to execute both built-in and custom commands within the DataGrid.
Core Methods:
- ExecuteCommand: Executes custom commands first, then falls back to built-in commands
- ExecuteDefaultCommand: Directly executes the built-in command, bypassing any custom overrides
Integration with User Interaction:
The CommandService automatically handles user interactions and translates them into command executions, allowing developers to intercept and customize any grid behavior through custom commands.
Commands
Gets the collection with all the custom commands registered with the CommandService. Custom commands have higher priority than the built-in (default) ones.
Declaration
public ObservableCollection<ControlCommandBase<RadDataGrid>> Commands { get; }
Property Value
Remarks
Custom Command Implementation:
To create a custom command, inherit from DataGridCommand and override the necessary methods:
- Id: Set the DataGridCommandId to specify which built-in command to override
- CanExecute: Define when the command can be executed
- Execute: Implement the custom command logic
Command Execution Flow:
- Custom commands are checked first based on their DataGridCommandId
- If no custom command matches or can execute, the default built-in command is used
- Use ExecuteDefaultCommand(DataGridCommandId, object) to invoke the original behavior
Available Command IDs:
Common command IDs include CellTap, CellDoubleTap, ColumnHeaderTap, BeginEdit, CommitEdit, CancelEdit, LoadMoreData, and others defined in DataGridCommandId.
CurrentCell
Gets or sets the current cell of the RadDataGrid.
Declaration
public DataGridCellInfo CurrentCell { get; set; }
Property Value
CurrentCellStyle
Gets or sets the Style that defines the appearance settings applied to the RadDataGrid's current cell. The Style should target DataGridCurrentCellAppearance.
Declaration
public Style CurrentCellStyle { get; set; }
Property Value
Style
DataOperationIndicationMode
Gets or sets a value that defines how data operation indicators are displayed when data operations like sorting, filtering, or grouping are applied.
Declaration
public DataOperationIndicationMode DataOperationIndicationMode { get; set; }
Property Value
A DataOperationIndicationMode value that determines the indication behavior. The default value is Individual.
Remarks
When set to Individual, separate indicators are shown for each operation (sort, filter, group) in the appropriate column headers.
When set to Universal, a single indicator shows the overall data operation state.
This property affects the visual feedback provided to users about active data operations on the grid.
EmptyContentDisplayMode
Gets or sets a value that specifies when the EmptyContentTemplate will be displayed.
Declaration
public EmptyContentDisplayMode EmptyContentDisplayMode { get; set; }
Property Value
EmptyContentTemplate
Gets or sets the DataTemplate that defines the content of the view which is shown when there are no items.
Declaration
public DataTemplate EmptyContentTemplate { get; set; }
Property Value
DataTemplate
ExpandedRowDetails
Gets or sets the collection of items that have expanded row details.
FilterDescriptors
Gets the collection of FilterDescriptorBase objects that defines the current filtering within this instance.
Declaration
public FilterDescriptorCollection FilterDescriptors { get; }
Property Value
FrozenColumns
Gets the collection of DataGridColumn objects currently frozen and displayed within the grid.
Declaration
public DataGridFrozenColumnCollection FrozenColumns { get; }
Property Value
FrozenColumnsSplitterStyle
Gets or sets the Style that defines the appearance settings applied to the RadDataGrid's splitter that divides the frozen from the unfrozen area. The Style should target DataGridFrozenColumnsSplitterAppearance.
Declaration
public Style FrozenColumnsSplitterStyle { get; set; }
Property Value
Style
GridLinesColor
Gets or sets the Color value that defines the appearance of grid's horizontal and vertical lines.
Declaration
public Color GridLinesColor { get; set; }
Property Value
Color
GridLinesThickness
Gets or sets the width of the vertical grid lines and the height of the horizontal grid lines.
GridLinesVisibility
Gets or sets the GridLinesVisibility value that defines which grid lines are currently visible (displayed).
Declaration
public GridLinesVisibility GridLinesVisibility { get; set; }
Property Value
GroupAggregateCellStyle
Gets or sets the Style for the appearance of each aggregate within the group header of the grid. The cells are visible when GroupAggregatesAlignment is set to NextToHeader. The Style should target DataGridGroupAggregateCellAppearance.
Declaration
public Style GroupAggregateCellStyle { get; set; }
Property Value
Style
GroupAggregateCellStyleSelector
Gets or sets the IStyleSelector instance that may be used to select different styles of each aggregate within the group header of the grid. The cells are visible when GroupAggregatesAlignment is set to NextToHeader.
Declaration
public IStyleSelector GroupAggregateCellStyleSelector { get; set; }
Property Value
GroupAggregateCellTemplate
Gets or sets the DataTemplate instance that defines the appearance of each aggregate within the group header of the grid. The cells are visible when GroupAggregatesAlignment is set to NextToHeader.
Declaration
public DataTemplate GroupAggregateCellTemplate { get; set; }
Property Value
DataTemplate
GroupAggregatesAlignment
Gets or sets a value that indicates the alignment of the aggregates in the group according its header.
Declaration
public DataGridGroupAggregatesAlignment GroupAggregatesAlignment { get; set; }
Property Value
GroupDescriptors
Gets the collection of GroupDescriptorBase objects that defines the current grouping within this instance. Multiple group descriptors define multiple group levels.
Declaration
public GroupDescriptorCollection GroupDescriptors { get; }
Property Value
GroupFooterStyle
Gets or sets the Style that defines the visual appearance of group footers within the grid. The Style should target DataGridGroupFooterAppearance to customize properties like background color, text formatting, and borders.
Declaration
public Style GroupFooterStyle { get; set; }
Property Value
Style
A Style object that applies to all group footers, or null
to use the default appearance.
Remarks
Group footers are displayed at the bottom of each group when ShowGroupFooters is set to true
.
This style provides a way to consistently format all group footers across the entire grid.
GroupFooterStyleSelector
Gets or sets the IStyleSelector instance that enables dynamic style selection for group footers based on the data context. This allows for conditional styling where different group footers can have different appearances based on their underlying data.
Declaration
public IStyleSelector GroupFooterStyleSelector { get; set; }
Property Value
An IStyleSelector implementation that receives a GroupFooterContext and returns the appropriate Style, or null
to use the default style selection.
Remarks
The style selector takes precedence over the GroupFooterStyle property when both are set. This is useful for scenarios where you need different styles for different group types or levels.
GroupFooterTemplate
Gets or sets the DataTemplate that defines the visual structure and layout of each group footer within the grid. This template allows for complete customization of the group footer appearance, including custom controls, layouts, and data binding.
Declaration
public DataTemplate GroupFooterTemplate { get; set; }
Property Value
DataTemplate
A DataTemplate where the data context is a GroupFooterContext instance containing group information, or null
to use the default group footer template.
Remarks
The GroupFooterContext provides access to the group key, item count, aggregate values, and other grouping-related properties.
Group footers are only displayed when ShowGroupFooters is set to true
.
Use this property when you need more control over the group footer layout than what styling alone can provide.
GroupHeaderStyle
Gets or sets the Style that defines the visual appearance of group headers within the grid. The Style should target DataGridGroupHeaderAppearance to customize properties like background color, text formatting, borders, and expand/collapse button appearance.
Declaration
public Style GroupHeaderStyle { get; set; }
Property Value
Style
A Style object that applies to all group headers, or null
to use the default appearance.
GroupHeaderStyleSelector
Gets or sets the IStyleSelector instance that enables dynamic style selection for group headers based on the data context. This allows for conditional styling where different group headers can have different appearances based on their underlying data.
Declaration
public IStyleSelector GroupHeaderStyleSelector { get; set; }
Property Value
An IStyleSelector implementation that receives a GroupHeaderContext and returns the appropriate Style, or null
to use the default style selection.
GroupHeaderTemplate
Gets or sets the DataTemplate that defines the visual structure and layout of each group header within the grid. This template allows for complete customization of the group header appearance, including custom controls, layouts, and data binding.
Declaration
public DataTemplate GroupHeaderTemplate { get; set; }
Property Value
DataTemplate
A DataTemplate where the data context is a GroupHeaderContext instance containing group information, or null
to use the default group header template.
Remarks
The GroupHeaderContext provides access to the group key, item count, and other grouping-related properties. Use this property when you need more control over the group header layout than what styling alone can provide.
GroupHeaderTemplateSelector
Gets or sets a DataTemplateSelector that enables dynamic template selection for group headers based on the data context. This allows different group headers to use different templates depending on their data, group level, or other contextual information.
Declaration
public DataTemplateSelector GroupHeaderTemplateSelector { get; set; }
Property Value
DataTemplateSelector
A DataTemplateSelector implementation where the SelectTemplate method receives a GroupHeaderContext as the item parameter, or null
to use the default template selection.
Remarks
The selector's SelectTemplate method will be called with a GroupHeaderContext instance that provides access to group-specific information. This is useful for scenarios where you need different templates for different group levels or group types.
GroupingPanelItemTemplate
Gets or sets the item template of the DataGridGroupingPanel.
Declaration
public DataTemplate GroupingPanelItemTemplate { get; set; }
Property Value
DataTemplate
HitTestService
Gets the HitTestService instance that provides methods for retrieving rows and cells from a given physical location.
Declaration
public HitTestService HitTestService { get; }
Property Value
IsBusy
Gets or sets a value indicating whether the built-in busy indicator is displayed during data processing operations.
When set to true
, the grid displays an indeterminate progress indicator while performing background operations such as sorting, filtering, grouping, or data loading.
Declaration
public bool IsBusy { get; set; }
Property Value
true
to show the busy indicator during data operations; false
to hide it. The default is false
.
Remarks
The busy indicator provides visual feedback to users that the grid is processing data and helps improve the user experience during potentially long-running operations. You can also manually control this property to show a busy state for custom operations. The indicator appears as an overlay on the entire grid control.
ItemsSource
Gets or sets the data provider.
ListenForNestedPropertyChange
Gets or sets a value indicating whether the DataGrid should be updated if INotifyPropertyChanged item from its source is changed.
Declaration
public bool ListenForNestedPropertyChange { get; set; }
Property Value
LoadOnDemandAutoTemplate
Gets or sets the DataTemplate of the row that get visualized when the LoadOnDemandMode is Auto.
Declaration
public DataTemplate LoadOnDemandAutoTemplate { get; set; }
Property Value
DataTemplate
LoadOnDemandBufferItemsCount
Gets or sets the incremental loading buffer items count.
Declaration
public int LoadOnDemandBufferItemsCount { get; set; }
Property Value
The incremental loading buffer items count.
LoadOnDemandMode
Gets or sets the load on demand mode.
Declaration
public LoadOnDemandMode LoadOnDemandMode { get; set; }
Property Value
LoadOnDemandRowStyle
Gets or sets the Style instance that defines the appearance of the load more data row. The Style should target DataGridLoadOnDemandRowAppearance.
Declaration
public Style LoadOnDemandRowStyle { get; set; }
Property Value
Style
LoadOnDemandRowTemplate
Gets or sets the DataTemplate of the row that get visualized when the LoadOnDemandMode is Manual.
Declaration
public DataTemplate LoadOnDemandRowTemplate { get; set; }
Property Value
DataTemplate
MouseHoverStyle
Gets or sets the Style for the appearance applied to the RadDataGrid cells and rows when the mouse is over them. The Style should target DataGridMouseHoverAppearance.
Declaration
public Style MouseHoverStyle { get; set; }
Property Value
Style
RenderMode
Gets or sets the render mode which defines how the content of the DataGrid is rendered - via SkiaSharp or other means (UIView elements in iOS and MacCatalyst).
Declaration
public DataGridRenderMode RenderMode { get; set; }
Property Value
RowBackgroundStyle
Gets or sets the Style for the appearance of each row. The Style should target DataGridRowBackgroundAppearance
Declaration
public Style RowBackgroundStyle { get; set; }
Property Value
Style
RowBackgroundStyleSelector
Gets or sets custom style-selection logic for a style that defines the appearance of each row.
Declaration
public IStyleSelector RowBackgroundStyleSelector { get; set; }
Property Value
RowDetailsTemplate
Gets or sets the DataTemplate or DataTemplateSelector used for displaying row details.
Declaration
public DataTemplate RowDetailsTemplate { get; set; }
Property Value
DataTemplate
RowHeight
Gets or sets the height of data rows in the grid.
Declaration
public double RowHeight { get; set; }
Property Value
The row height in device-independent units, or NaN to enable automatic row height calculation based on content. The default value is NaN.
Remarks
When set to a specific value, all data rows will have a uniform height, which can improve scrolling performance. When set to NaN, each row will measure its content and size itself accordingly, which allows for variable row heights but may impact performance. This property does not affect the height of column headers, group headers, or other non-data row elements.
SearchPanel
Gets or sets the panel that contains search related views.
Declaration
public DataGridSearchPanel SearchPanel { get; set; }
Property Value
SearchSettings
Gets or sets the corresponding search settings.
Declaration
public DataGridSearchSettings SearchSettings { get; set; }
Property Value
SelectedItem
Gets or sets the selected item of the DataGrid.
Declaration
public object SelectedItem { get; set; }
Property Value
Remarks
When the value of the SelectionUnit is Cell, the selected item is of type DataGridCellInfo. When the value of the SelectionUnit is Row, the selected item is of the same type as the business object.
SelectedItems
Gets the currently selected items within this instance. The type of items within the collection depends on the current SelectionUnit value: - The data item (row) when the selection unit is Row. - A DataGridCellInfo object when the selection unit is Cell.
Declaration
public ObservableCollection<object> SelectedItems { get; }
Property Value
SelectionMode
Gets or sets the selection mode that determines how many items can be selected simultaneously.
Declaration
public DataGridSelectionMode SelectionMode { get; set; }
Property Value
A DataGridSelectionMode value. The default is Single.
Remarks
Single allows only one item to be selected at a time. Multiple allows multiple items to be selected using touch/mouse gestures and keyboard modifiers. None disables selection entirely.
SelectionStyle
Gets or sets the Style for the appearance applied to the RadDataGrid selection. The Style should target DataGridSelectionAppearance.
Declaration
public Style SelectionStyle { get; set; }
Property Value
Style
SelectionUnit
Gets or sets the selection unit that determines whether entire rows or individual cells can be selected.
Declaration
public DataGridSelectionUnit SelectionUnit { get; set; }
Property Value
A DataGridSelectionUnit value. The default is Row.
Remarks
When set to Row, users can select entire rows and the SelectedItems collection contains business objects. When set to Cell, users can select individual cells and the SelectedItems collection contains DataGridCellInfo objects.
ServicePanel
Gets or sets the panel that contains various service related views such as the DataGridGroupingPanel.
Declaration
public DataGridServicePanel ServicePanel { get; set; }
Property Value
ShowColumnFooters
Gets or sets a value indicating whether to show column footers.
ShowGroupFooters
Gets or sets a value indicating whether group footers are displayed at the bottom of each group in the grid.
Declaration
public bool ShowGroupFooters { get; set; }
Property Value
true
to display group footers; false
to hide them. The default is false
.
Remarks
Group footers provide a summary area at the end of each group where you can display aggregate information such as counts, sums, averages, etc.
Use the GroupFooterTemplate property to customize the appearance and content of group footers.
Group footers are only visible when the data is grouped (i.e., when there are items in the GroupDescriptors collection).
ShowGroupHeaderAggregates
Gets or sets a value indicating whether to show aggregates in the group headers.
Declaration
public bool ShowGroupHeaderAggregates { get; set; }
Property Value
SortDescriptors
Gets the collection of SortDescriptorBase objects that defines the current sorting within this instance. Multiple sort descriptors define a sorting operation by multiple keys.
Declaration
public SortDescriptorCollection SortDescriptors { get; }
Property Value
UnfrozenColumns
Gets the collection of DataGridColumn objects currently unfrozen and displayed within the grid.
Declaration
public ReadOnlyObservableCollection<DataGridColumn> UnfrozenColumns { get; }
Property Value
UserEditMode
Gets or sets the user edit mode of the DataGrid.
Declaration
public DataGridUserEditMode UserEditMode { get; set; }
Property Value
The can user edit.
UserFilterMode
Gets or sets the DataGridUserFilterMode value that defines whether the Filter Glyph is present in the header of the currently available filterable columns.
The default value is DataGridUserFilterMode.Auto
Declaration
public DataGridUserFilterMode UserFilterMode { get; set; }
Property Value
UserGroupMode
Gets or sets the DataGridUserGroupMode value that determines whether the User is allowed to change the current Grouping state through the User Interface.
The default value is DataGridUserGroupMode.Auto
Declaration
public DataGridUserGroupMode UserGroupMode { get; set; }
Property Value
UserSortMode
Gets or sets the DataGridUserSortMode value that defines how User Input (column header tap) affects the current Sort state of the grid.
The default value is DataGridUserSortMode.Auto
Declaration
public DataGridUserSortMode UserSortMode { get; set; }
Property Value
ViewportBufferHeight
Gets or sets the height of the viewport buffer used for virtualization optimization. The buffer extends the viewport beyond the visible area to improve scrolling performance by pre-rendering additional rows.
Declaration
public double ViewportBufferHeight { get; set; }
Property Value
The buffer height in device-independent units. The default value is 200.0.
Remarks
A larger buffer improves perceived performance during scrolling by reducing the likelihood of blank areas appearing, but uses more memory. A smaller buffer uses less memory but may show blank areas during fast scrolling. This property is particularly important for large datasets where UI virtualization is critical for performance.
VisualStateService
Gets the service that handles visual-state related logic, such as keeping track of the element that the mouse is currently over.
Declaration
public DataGridVisualStateService VisualStateService { get; }
Property Value
Methods
CanRebuildUI(UpdateFlags)
Declaration
protected virtual bool CanRebuildUI(UpdateFlags flags)
Parameters
flags
Returns
CreateFilterTapContext(DataGridColumn)
Generates FilterTapContext for the specified column.
Declaration
public FilterTapContext CreateFilterTapContext(DataGridColumn column)
Parameters
column
Returns
DeselectAll()
Clears the current selection state.
Declaration
public void DeselectAll()
DeselectCell(DataGridCellInfo)
Removes the selection for the grid cell defined by the specified cell info.
Declaration
public void DeselectCell(DataGridCellInfo item)
Parameters
item
DeselectItem(object)
Removes the selection for the specified data item and removes it from the SelectedItems collection.
GetDataView()
Gets the IDataViewCollection instance that can be used to traverse and/or manipulate the data after all the Sort, Group and Filter operations are applied.
GetDistinctValues(DataGridColumn, bool)
Retrieves the distinct values for a specified column that can be used for filtering operations.
Declaration
public IEnumerable GetDistinctValues(DataGridColumn column, bool filterByOtherDescriptors)
Parameters
column
The DataGridColumn for which to retrieve distinct values.
filterByOtherDescriptors
true
to apply all other active filters from the FilterDescriptors collection when determining distinct values (excluding the filter for the specified column);
false
to retrieve distinct values from the entire unfiltered dataset.
Returns
An IEnumerable containing the distinct values for the specified column. These values represent the unique data that can appear in cells for this column.
Remarks
This method is commonly used to populate filter UI controls with available values for a column.
When filterByOtherDescriptors
is true
, the returned distinct values will reflect
only the values that exist in the currently filtered dataset, providing a more relevant set of filter options.
OnBindingContextChanged()
Invoked whenever the binding context of the element changes. Implement this method to add class handling for this event.
Declaration
protected override void OnBindingContextChanged()
OnHandlerChanged()
Declaration
protected override void OnHandlerChanged()
OnPropertyChanged(string)
Declaration
protected override void OnPropertyChanged(string propertyName = null)
Parameters
propertyName
ScrollColumnIntoView(DataGridColumn)
Scrolls the grid horizontally to bring the specified column into the visible viewport.
Declaration
public void ScrollColumnIntoView(DataGridColumn column)
Parameters
column
The DataGridColumn to scroll into view.
Remarks
This method will scroll the grid horizontally to ensure the specified column is visible. If the column is frozen or not part of the grid, no scrolling will occur. The scrolling operation adjusts the horizontal scroll position to make the column visible while maintaining the current vertical scroll position.
ScrollItemIntoView(object)
Scrolls the grid to bring the specified data item into the visible viewport.
Declaration
public void ScrollItemIntoView(object item)
Parameters
item
The business object from the ItemsSource to scroll into view.
Exceptions
Thrown when item
is null
.
Remarks
This method will scroll the grid vertically to ensure the row containing the specified item is visible. If the item is not found in the current data source, no scrolling will occur. The scrolling operation respects the current grouping, sorting, and filtering state of the grid.
SelectAll()
Selects all the items as defined by the SelectionMode and SelectionUnit
Declaration
public void SelectAll()
SelectCell(DataGridCellInfo)
Selects the grid cell as defined by the specified cell info.
Declaration
public void SelectCell(DataGridCellInfo item)
Parameters
item
Remarks
In order to select a cell, the SelectionUnit value should be DataGridSelectionUnit.Cell
.
SelectItem(object)
Selects the specified data item and adds it in the SelectedItems collection.
Declaration
public void SelectItem(object item)
Parameters
item
Remarks
In order to select a Row, the SelectionUnit value should be DataGridSelectionUnit.Row
.
Events
ColumnReorderCompleting
Occurs when the user drops the column, doesn't necessarily mean reorder will occur.
Declaration
public event EventHandler<ColumnReorderCompletingEventArgs> ColumnReorderCompleting
Event Value
ColumnReorderStarting
Occurs when the user starts to drag a column to reorder it.
Declaration
public event EventHandler<ColumnReorderStartingEventArgs> ColumnReorderStarting
Event Value
ColumnReordered
Occurs when a column has been successfully reordered.
Declaration
public event EventHandler<ColumnReorderedEventArgs> ColumnReordered
Event Value
ColumnReordering
Occurs continuously while the column is being dragged.
Declaration
public event EventHandler<ColumnReorderingEventArgs> ColumnReordering
Event Value
ColumnUserResizeCompleted
Occurs when a column has been resized by user interaction.
Declaration
public event EventHandler<ColumnUserResizeCompletedEventArgs> ColumnUserResizeCompleted
Event Value
CurrentCellChanged
Occurs when the CurrentCell property has changed.
Declaration
public event EventHandler<CurrentCellChangedEventArgs> CurrentCellChanged
Event Value
DataBindingComplete
Occurs when the data binding process is completed after the ItemsSource has been processed or when data operations such as grouping, sorting, or filtering have been applied.
Declaration
public event EventHandler<DataBindingCompleteEventArgs> DataBindingComplete
Event Value
Remarks
This event is raised after the grid has finished processing the data source and applying any active data operations. It provides an opportunity to perform additional actions once the data is ready for display, such as updating UI state, applying custom styling, or performing calculations based on the processed data.
The event is raised in the following scenarios:
- When the ItemsSource is initially set or changed
- When grouping operations are applied or modified
- When sorting operations are applied or modified
- When filtering operations are applied or modified
- When data refresh operations complete
DistinctValuesLoading
Occurs when loading the distinct values that will be displayed in the DataGridDistinctValuesFilterView. Use this event and its arguments to modify the list of distinct values and bypass the built-in logic of choosing items to display.
Declaration
public event EventHandler<DistinctValuesLoadingEventArgs> DistinctValuesLoading
Event Value
LoadOnDemand
Fires when load on demand is requested.
Declaration
public event EventHandler<LoadOnDemandEventArgs> LoadOnDemand
Event Value
SelectionChanged
Occurs when the currently selected items change.
Declaration
public event EventHandler<DataGridSelectionChangedEventArgs> SelectionChanged
Event Value