RadDataGrid
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
Initializes a new instance of the RadDataGrid class.
public RadDataGrid()
Fields
AIRequestFuncProperty
BindableProperty
Identifies the AIRequestFunc property.
public static readonly BindableProperty AIRequestFuncProperty
AIResponseActionProperty
BindableProperty
Identifies the AIResponseAction property.
public static readonly BindableProperty AIResponseActionProperty
AISettingsProperty
BindableProperty
Identifies the AISettings property.
public static readonly BindableProperty AISettingsProperty
AIViewTemplateProperty
BindableProperty
Identifies the AIViewTemplate property.
public static readonly BindableProperty AIViewTemplateProperty
AlternateRowBackgroundStyleProperty
BindableProperty
Identifies the AlternateRowBackgroundStyle property.
public static readonly BindableProperty AlternateRowBackgroundStyleProperty
ApplyDataOperationsOnPropertyChangeProperty
BindableProperty
Identifies the ApplyDataOperationsOnPropertyChange dependency property.
public static readonly BindableProperty ApplyDataOperationsOnPropertyChangeProperty
AreGroupHeadersClippedWhenFrozenProperty
BindableProperty
Identifies the AreGroupHeadersClippedWhenFrozen property.
public static readonly BindableProperty AreGroupHeadersClippedWhenFrozenProperty
AreRowDetailsFrozenProperty
BindableProperty
Identifies the AreRowDetailsFrozen property.
public static readonly BindableProperty AreRowDetailsFrozenProperty
AutoExpandGroupsProperty
BindableProperty
Identifies the AutoExpandGroups property.
public static readonly BindableProperty AutoExpandGroupsProperty
AutoGenerateColumnsProperty
BindableProperty
Identifies the AutoGenerateColumns dependency property.
public static readonly BindableProperty AutoGenerateColumnsProperty
BorderBrushProperty
BindableProperty
Identifies the BorderBrush property.
public static readonly BindableProperty BorderBrushProperty
BorderThicknessProperty
BindableProperty
Identifies the BorderThickness property.
public static readonly BindableProperty BorderThicknessProperty
CanUserExpandMultipleRowDetailsProperty
BindableProperty
Identifies the CanUserExpandMultipleRowDetails property.
public static readonly BindableProperty CanUserExpandMultipleRowDetailsProperty
CanUserReorderColumnsProperty
BindableProperty
Identifies the CanUserReorderColumns property.
public static readonly BindableProperty CanUserReorderColumnsProperty
CanUserResizeColumnsProperty
BindableProperty
Identifies the CanUserResizeColumns property.
public static readonly BindableProperty CanUserResizeColumnsProperty
ColumnHeaderDragVisualTemplateProperty
BindableProperty
Identifies the ColumnHeaderDragVisualTemplate property.
public static readonly BindableProperty ColumnHeaderDragVisualTemplateProperty
ColumnReorderIndicatorTemplateProperty
BindableProperty
Identifies the ColumnReorderIndicatorTemplate property.
public static readonly BindableProperty ColumnReorderIndicatorTemplateProperty
CurrentCellProperty
BindableProperty
Identifies the CurrentCell property.
public static readonly BindableProperty CurrentCellProperty
CurrentCellStyleProperty
BindableProperty
Identifies the CurrentCellStyle property.
public static readonly BindableProperty CurrentCellStyleProperty
DataOperationIndicationModeProperty
BindableProperty
Identifies the DataOperationIndicationMode property.
public static readonly BindableProperty DataOperationIndicationModeProperty
DraggedObjectProperty
BindableProperty
Identifies the DraggedObject property.
public static readonly BindableProperty DraggedObjectProperty
EmptyContentDisplayModeProperty
BindableProperty
Identifies the EmptyContentDisplayMode property.
public static readonly BindableProperty EmptyContentDisplayModeProperty
EmptyContentTemplateProperty
BindableProperty
Identifies the EmptyContentTemplate property.
public static readonly BindableProperty EmptyContentTemplateProperty
ExpandedRowDetailsProperty
BindableProperty
Identifies the ExpandedRowDetails property.
public static readonly BindableProperty ExpandedRowDetailsProperty
FilterDescriptorsProperty
BindableProperty
Identifies the FilterDescriptors dependency property.
public static readonly BindableProperty FilterDescriptorsProperty
FrozenColumnsSplitterStyleProperty
BindableProperty
Identifies the FrozenColumnsSplitterStyle property.
public static readonly BindableProperty FrozenColumnsSplitterStyleProperty
GridLinesColorProperty
BindableProperty
Identifies the GridLinesColor property.
public static readonly BindableProperty GridLinesColorProperty
GridLinesThicknessProperty
BindableProperty
Identifies the GridLinesThickness property.
public static readonly BindableProperty GridLinesThicknessProperty
GridLinesVisibilityProperty
BindableProperty
Identifies the GridLinesVisibility property.
public static readonly BindableProperty GridLinesVisibilityProperty
GroupAggregateCellStyleProperty
BindableProperty
Identifies the GroupAggregateCellStyle property.
public static readonly BindableProperty GroupAggregateCellStyleProperty
GroupAggregateCellStyleSelectorProperty
BindableProperty
Identifies the GroupAggregateCellStyleSelector property.
public static readonly BindableProperty GroupAggregateCellStyleSelectorProperty
GroupAggregateCellTemplateProperty
BindableProperty
Identifies the GroupAggregateCellTemplate property.
public static readonly BindableProperty GroupAggregateCellTemplateProperty
GroupAggregatesAlignmentProperty
BindableProperty
Identifies the GroupAggregatesAlignment dependency property.
public static readonly BindableProperty GroupAggregatesAlignmentProperty
GroupDescriptorsProperty
BindableProperty
Identifies the GroupDescriptors dependency property.
public static readonly BindableProperty GroupDescriptorsProperty
GroupFooterStyleProperty
BindableProperty
Identifies the GroupFooterStyle property.
public static readonly BindableProperty GroupFooterStyleProperty
GroupFooterStyleSelectorProperty
BindableProperty
Identifies the GroupFooterStyleSelector property.
public static readonly BindableProperty GroupFooterStyleSelectorProperty
GroupFooterTemplateProperty
BindableProperty
Identifies the GroupFooterTemplate property.
public static readonly BindableProperty GroupFooterTemplateProperty
GroupHeaderStyleProperty
BindableProperty
Identifies the GroupHeaderStyle property.
public static readonly BindableProperty GroupHeaderStyleProperty
GroupHeaderStyleSelectorProperty
BindableProperty
Identifies the GroupHeaderStyleSelector property.
public static readonly BindableProperty GroupHeaderStyleSelectorProperty
GroupHeaderTemplateProperty
BindableProperty
Identifies the GroupHeaderTemplate property.
public static readonly BindableProperty GroupHeaderTemplateProperty
GroupHeaderTemplateSelectorProperty
BindableProperty
Identifies the GroupHeaderTemplateSelector property.
public static readonly BindableProperty GroupHeaderTemplateSelectorProperty
GroupingPanelItemTemplateProperty
BindableProperty
Identifies the GroupingPanelItemTemplate property.
public static readonly BindableProperty GroupingPanelItemTemplateProperty
IsAIEnabledProperty
BindableProperty
Identifies the IsAIEnabled property.
public static readonly BindableProperty IsAIEnabledProperty
IsBusyProperty
BindableProperty
Identifies the IsBusy property.
public static readonly BindableProperty IsBusyProperty
ItemsSourceProperty
BindableProperty
Identifies the ItemsSource dependency property.
public static readonly BindableProperty ItemsSourceProperty
ListenForNestedPropertyChangeProperty
BindableProperty
Identifies the ListenForNestedPropertyChange property.
public static readonly BindableProperty ListenForNestedPropertyChangeProperty
LoadOnDemandAutoTemplateProperty
BindableProperty
Identifies the LoadOnDemandAutoTemplate property.
public static readonly BindableProperty LoadOnDemandAutoTemplateProperty
LoadOnDemandBufferItemsCountProperty
BindableProperty
Identifies the LoadOnDemandBufferItemsCount property.
public static readonly BindableProperty LoadOnDemandBufferItemsCountProperty
LoadOnDemandModeProperty
BindableProperty
Identifies the LoadOnDemandMode property.
public static readonly BindableProperty LoadOnDemandModeProperty
LoadOnDemandRowStyleProperty
BindableProperty
Identifies the LoadOnDemandRowStyle property.
public static readonly BindableProperty LoadOnDemandRowStyleProperty
LoadOnDemandRowTemplateProperty
BindableProperty
Identifies the LoadOnDemandRowTemplate property.
public static readonly BindableProperty LoadOnDemandRowTemplateProperty
MouseHoverStyleProperty
BindableProperty
Identifies the MouseHoverStyle property.
public static readonly BindableProperty MouseHoverStyleProperty
RenderModeProperty
BindableProperty
Identifies the RenderMode property.
public static readonly BindableProperty RenderModeProperty
RowBackgroundStyleProperty
BindableProperty
Identifies the RowBackgroundStyle property.
public static readonly BindableProperty RowBackgroundStyleProperty
RowBackgroundStyleSelectorProperty
BindableProperty
Identifies the RowBackgroundStyleSelector property.
public static readonly BindableProperty RowBackgroundStyleSelectorProperty
RowDetailsTemplateProperty
BindableProperty
Identifies the RowDetailsTemplate property.
public static readonly BindableProperty RowDetailsTemplateProperty
RowHeightProperty
BindableProperty
Identifies the RowHeight property.
public static readonly BindableProperty RowHeightProperty
SearchPanelProperty
BindableProperty
Identifies the SearchPanel property.
public static readonly BindableProperty SearchPanelProperty
SearchSettingsProperty
BindableProperty
Identifies the SearchSettings property.
public static readonly BindableProperty SearchSettingsProperty
SelectedItemProperty
BindableProperty
Identifies the SelectedItem property.
public static readonly BindableProperty SelectedItemProperty
SelectedItemsProperty
BindableProperty
Identifies the SelectedItems property.
public static readonly BindableProperty SelectedItemsProperty
SelectionModeProperty
BindableProperty
Identifies the SelectionMode property.
public static readonly BindableProperty SelectionModeProperty
SelectionStyleProperty
BindableProperty
Identifies the SelectionStyle property.
public static readonly BindableProperty SelectionStyleProperty
SelectionUnitProperty
BindableProperty
Identifies the SelectionUnit property.
public static readonly BindableProperty SelectionUnitProperty
ServicePanelProperty
BindableProperty
Identifies the ServicePanel property.
public static readonly BindableProperty ServicePanelProperty
ShowColumnFootersProperty
BindableProperty
Identifies the ShowColumnFooters dependency property.
public static readonly BindableProperty ShowColumnFootersProperty
ShowColumnHeadersProperty
BindableProperty
Identifies the ShowColumnHeaders property.
public static readonly BindableProperty ShowColumnHeadersProperty
ShowGroupFootersProperty
BindableProperty
Identifies the ShowGroupFooters dependency property.
public static readonly BindableProperty ShowGroupFootersProperty
ShowGroupHeaderAggregatesProperty
BindableProperty
Identifies the ShowGroupHeaderAggregates dependency property.
public static readonly BindableProperty ShowGroupHeaderAggregatesProperty
SortDescriptorsProperty
BindableProperty
Identifies the SortDescriptors dependency property.
public static readonly BindableProperty SortDescriptorsProperty
UserEditModeProperty
BindableProperty
Identifies the UserEditMode property.
public static readonly BindableProperty UserEditModeProperty
UserFilterModeProperty
BindableProperty
Identifies the UserFilterMode property.
public static readonly BindableProperty UserFilterModeProperty
UserGroupModeProperty
BindableProperty
Identifies the UserGroupMode dependency property.
public static readonly BindableProperty UserGroupModeProperty
UserSortModeProperty
BindableProperty
Identifies the UserSortMode dependency property.
public static readonly BindableProperty UserSortModeProperty
ViewportBufferHeightProperty
BindableProperty
Identifies the ViewportBufferHeight property.
public static readonly BindableProperty ViewportBufferHeightProperty
Properties
Gets a function that creates an AI request from the current grid structure and a user prompt.
public Func<string, string> AIRequestFunc { get; }
This read-only property exposes a factory function that can be used to generate AI requests based on the current grid's column metadata and a user-provided prompt. The function can be called from ViewModels or code-behind to prepare data for AI processing without exposing the underlying DataGrid reference.
Gets an action that processes AI-generated response JSON to update the grid.
public Action<string> AIResponseAction { get; }
This read-only property exposes an action that can be invoked from ViewModels or code-behind to process AI responses. Call this action with a JSON string containing AI commands, and the response will be automatically deserialized and applied to the grid. Unlike a bindable property, this action will execute every time it's invoked, even with identical JSON strings.
Gets or sets the AI prompt settings that configure and control the DataGrid's AI prompt panel UI.
public DataGridAISettings AISettings { get; set; }
Supported type: DataGridAISettings.
AIViewTemplate
DataTemplate
Gets or sets the DataTemplate used visualize the AI view in the DataGrid.
public DataTemplate AIViewTemplate { get; set; }
Gets or sets the Style that defines the appearance of an alternate row. The Style should target DataGridRowBackgroundAppearance.
public Style AlternateRowBackgroundStyle { get; set; }
Gets or sets a value indicating whether the operations (sorting, filtering, grouping) should be applied when PropertyChanged event is raised.
public bool ApplyDataOperationsOnPropertyChange { get; set; }
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.
public bool AreGroupHeadersClippedWhenFrozen { get; set; }
Gets or sets a value indicating whether or not the row details are frozen, i.e. they retain position during horizontal scroll.
public bool AreRowDetailsFrozen { get; set; }
Gets or sets a value indicating whether newly added groups should be automatically expanded.
public bool AutoExpandGroups { get; set; }
Gets or sets a value indicating whether grid's columns will be auto-generated from the provided ViewModel's properties.
public bool AutoGenerateColumns { get; set; }
BorderBrush
Brush
Gets or sets the Brush of the border placed around the RadDataGrid control.
public Brush BorderBrush { get; set; }
BorderThickness
Thickness
Gets or sets the thickness of the border placed around the RadDataGrid control.
public Thickness BorderThickness { get; set; }
Gets or sets a value indicating whether multiple row details can be expanded.
public bool CanUserExpandMultipleRowDetails { get; set; }
Gets or sets a value indicating whether the user can reorder the DataGridColumns in the RadDataGrid.
public bool CanUserReorderColumns { get; set; }
Gets or sets a value indicating whether the user can resize all DataGridColumns. This is only suppoted in WinUI and MacCatalyst.
public bool CanUserResizeColumns { get; set; }
ColumnHeaderDragVisualTemplate
DataTemplate
Gets or sets the template that presents the drag visual of the dragged column header.
public DataTemplate ColumnHeaderDragVisualTemplate { get; set; }
ColumnReorderIndicatorTemplate
DataTemplate
Gets or sets the template that presents the indicator that is shown between two columns during reordering.
public DataTemplate ColumnReorderIndicatorTemplate { get; set; }
Gets the collection of DataGridColumn objects currently displayed within the grid.
public DataGridColumnCollection Columns { get; }
Available DataGridColumn types include:
- DataGridTextColumn – Displays text by converting each cell value to a string. Provides optional custom formatting via CellContentFormat and text editing using a RadEntry.
- DataGridBooleanColumn – Specialized for bool values. Renders and edits values with a and supplies default distinct values (true, false, null).
- DataGridNumericalColumn – Optimized for numeric data. Uses a RadNumericInput editor and supports numeric formatting.
- DataGridDateColumn – Handles DateTime values. Uses a RadDatePicker editor and applies a default short date format ("{0:d}").
- DataGridTimeColumn – Displays and edits TimeSpan values using a RadTimePicker with a default "HH:mm" format ("{0:hh\\:mm}").
- DataGridComboBoxColumn – Presents values with a RadComboBox editor. Supports item source binding (ItemsSource, ItemsSourcePath) and display member path via ItemDisplayBindingPath; also enables grouping/sorting by nested display values.
Gets the collection with all the custom commands registered with the CommandService. Custom commands have higher priority than the built-in (default) ones.
public ObservableCollection<ControlCommandBase<RadDataGrid>> Commands { get; }
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.
See also: DataGridCommand, DataGridCommandId, DataGridCommandService.
Gets the DataGridCommandService instance that manages the commanding behavior of this instance.
public DataGridCommandService CommandService { get; }
Implements:
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.
Gets or sets the current cell of the RadDataGrid.
public DataGridCellInfo CurrentCell { get; set; }
CurrentCellStyle
Style
Gets or sets the Style that defines the appearance settings applied to the RadDataGrid's current cell. The Style should target DataGridCurrentCellAppearance.
public Style CurrentCellStyle { get; set; }
Gets or sets a value that defines how data operation indicators are displayed when data operations like sorting, filtering, or grouping are applied.
public DataOperationIndicationMode DataOperationIndicationMode { get; set; }
A DataOperationIndicationMode value that determines the indication behavior. The default value is Individual.
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.
Gets or sets a value that specifies when the EmptyContentTemplate will be displayed.
public EmptyContentDisplayMode EmptyContentDisplayMode { get; set; }
EmptyContentTemplate
DataTemplate
Gets or sets the DataTemplate that defines the content of the view which is shown when there are no items.
public DataTemplate EmptyContentTemplate { get; set; }
Gets or sets the collection of items that have expanded row details.
public IList ExpandedRowDetails { get; set; }
Gets the collection of FilterDescriptorBase objects that defines the current filtering within this instance.
public FilterDescriptorCollection FilterDescriptors { get; }
Available FilterDescriptorBase types include:
- PropertyFilterDescriptor - Filters by a property using comparison operators.
- TextFilterDescriptor - Performs text matching (Contains, StartsWith, EndsWith, etc.).
- NumericalFilterDescriptor - Applies numeric comparisons and range constraints.
- DateTimeFilterDescriptor - Filters DateTime values (exact, range, date-part logic).
- TimeSpanFilterDescriptor - Filters TimeSpan values using relational or interval logic.
- BooleanFilterDescriptor - Matches boolean (and nullable boolean) values.
- NestedPropertyTextFilterDescriptor - Text filtering over a dotted/nested property path.
- DistinctValuesFilterDescriptor - Includes items whose property value is in a selected set.
- CompositeFilterDescriptor - Combines multiple filters with logical AND / OR.
- DelegateFilterDescriptor - Uses a custom predicate for arbitrary filter logic.
Gets the collection of DataGridColumn objects currently frozen and displayed within the grid.
public DataGridFrozenColumnCollection FrozenColumns { get; }
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.
public Style FrozenColumnsSplitterStyle { get; set; }
GridLinesColor
Color
Gets or sets the Color value that defines the appearance of grid's horizontal and vertical lines.
public Color GridLinesColor { get; set; }
Gets or sets the width of the vertical grid lines and the height of the horizontal grid lines.
public double GridLinesThickness { get; set; }
Gets or sets the GridLinesVisibility value that defines which grid lines are currently visible (displayed).
public GridLinesVisibility GridLinesVisibility { get; set; }
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.
public Style GroupAggregateCellStyle { get; set; }
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.
public IStyleSelector GroupAggregateCellStyleSelector { get; set; }
GroupAggregateCellTemplate
DataTemplate
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.
public DataTemplate GroupAggregateCellTemplate { get; set; }
Gets or sets a value that indicates the alignment of the aggregates in the group according its header.
public DataGridGroupAggregatesAlignment GroupAggregatesAlignment { get; set; }
Gets the collection of GroupDescriptorBase objects that defines the current grouping within this instance. Multiple group descriptors define multiple group levels.
public GroupDescriptorCollection GroupDescriptors { get; }
Available GroupDescriptorBase types include:
- PropertyGroupDescriptor - Groups items by the value of a specified property.
- DelegateGroupDescriptor - Groups items using a custom key extraction delegate (IKeyLookup) for flexible grouping logic.
GroupFooterStyle
Style
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.
public Style GroupFooterStyle { get; set; }
A Style object that applies to all group footers, or null to use the default appearance.
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.
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.
public IStyleSelector GroupFooterStyleSelector { get; set; }
An IStyleSelector implementation that receives a GroupFooterContext and returns the appropriate Style, or null to use the default style selection.
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
DataTemplate
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.
public DataTemplate GroupFooterTemplate { get; set; }
A DataTemplate where the data context is a GroupFooterContext instance containing group information, or null to use the default group footer template.
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
Style
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.
public Style GroupHeaderStyle { get; set; }
A Style object that applies to all group headers, or null to use the default appearance.
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.
public IStyleSelector GroupHeaderStyleSelector { get; set; }
An IStyleSelector implementation that receives a GroupHeaderContext and returns the appropriate Style, or null to use the default style selection.
GroupHeaderTemplate
DataTemplate
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.
public DataTemplate GroupHeaderTemplate { get; set; }
A DataTemplate where the data context is a GroupHeaderContext instance containing group information, or null to use the default group header template.
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
DataTemplateSelector
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.
public DataTemplateSelector GroupHeaderTemplateSelector { get; set; }
A DataTemplateSelector implementation where the SelectTemplate method receives a GroupHeaderContext as the item parameter, or null to use the default template selection.
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
DataTemplate
Gets or sets the item template of the DataGridGroupingPanel.
public DataTemplate GroupingPanelItemTemplate { get; set; }
Gets the HitTestService instance that provides methods for retrieving rows and cells from a given physical location.
public HitTestService HitTestService { get; }
Gets or sets a value indicating whether the AI functionality is enabled for the DataGrid.
public bool IsAIEnabled { get; set; }
When set to false, the AI button and AI panel will be hidden and AI features will be disabled.
Default value is false.
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.
public bool IsBusy { get; set; }
true to show the busy indicator during data operations; false to hide it. The default is false.
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.
Gets or sets the data provider.
public object ItemsSource { get; set; }
Gets or sets a value indicating whether the DataGrid should be updated if INotifyPropertyChanged item from its source is changed.
public bool ListenForNestedPropertyChange { get; set; }
LoadOnDemandAutoTemplate
DataTemplate
Gets or sets the DataTemplate of the row that get visualized when the LoadOnDemandMode is Auto.
public DataTemplate LoadOnDemandAutoTemplate { get; set; }
Gets or sets the incremental loading buffer items count.
public int LoadOnDemandBufferItemsCount { get; set; }
The incremental loading buffer items count.
Gets or sets the load on demand mode.
public LoadOnDemandMode LoadOnDemandMode { get; set; }
LoadOnDemandRowStyle
Style
Gets or sets the Style instance that defines the appearance of the load more data row. The Style should target DataGridLoadOnDemandRowAppearance.
public Style LoadOnDemandRowStyle { get; set; }
LoadOnDemandRowTemplate
DataTemplate
Gets or sets the DataTemplate of the row that get visualized when the LoadOnDemandMode is Manual.
public DataTemplate LoadOnDemandRowTemplate { get; set; }
MouseHoverStyle
Style
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.
public Style MouseHoverStyle { get; set; }
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).
public DataGridRenderMode RenderMode { get; set; }
RowBackgroundStyle
Style
Gets or sets the Style for the appearance of each row. The Style should target DataGridRowBackgroundAppearance
public Style RowBackgroundStyle { get; set; }
Gets or sets custom style-selection logic for a style that defines the appearance of each row.
public IStyleSelector RowBackgroundStyleSelector { get; set; }
RowDetailsTemplate
DataTemplate
Gets or sets the DataTemplate or DataTemplateSelector used for displaying row details.
public DataTemplate RowDetailsTemplate { get; set; }
Gets or sets the height of data rows in the grid.
public double RowHeight { get; set; }
The row height in device-independent units, or NaN to enable automatic row height calculation based on content. The default value is NaN.
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.
Gets or sets the panel that contains search related views.
public DataGridSearchPanel SearchPanel { get; set; }
Gets or sets the search settings that configure and control the DataGrid's built-in search experience.
public DataGridSearchSettings SearchSettings { get; set; }
Supported type: DataGridSearchSettings.
Gets or sets the selected item of the DataGrid.
public object SelectedItem { get; set; }
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.
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.
public ObservableCollection<object> SelectedItems { get; }
Gets or sets the selection mode that determines how many items can be selected simultaneously.
public DataGridSelectionMode SelectionMode { get; set; }
A DataGridSelectionMode value. The default is Single.
SelectionStyle
Style
Gets or sets the Style for the appearance applied to the RadDataGrid selection. The Style should target DataGridSelectionAppearance.
public Style SelectionStyle { get; set; }
Gets or sets the selection unit that determines whether entire rows or individual cells can be selected.
public DataGridSelectionUnit SelectionUnit { get; set; }
A DataGridSelectionUnit value. The default is Row.
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.
Gets or sets the panel that contains various service related views such as the DataGridGroupingPanel.
public DataGridServicePanel ServicePanel { get; set; }
Gets or sets a value indicating whether to show column footers.
public bool ShowColumnFooters { get; set; }
Gets or sets a value indicating whether the column headers are visible or not.
public bool ShowColumnHeaders { get; set; }
Gets or sets a value indicating whether group footers are displayed at the bottom of each group in the grid.
public bool ShowGroupFooters { get; set; }
true to display group footers; false to hide them. The default is false.
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).
Gets or sets a value indicating whether to show aggregates in the group headers.
public bool ShowGroupHeaderAggregates { get; set; }
Gets the collection of SortDescriptorBase objects that defines the current sorting within this instance. Multiple sort descriptors define a sorting operation by multiple keys.
public SortDescriptorCollection SortDescriptors { get; }
Available SortDescriptorBase types include:
- PropertySortDescriptor - Sorts items by the value of a specified property.
- DelegateSortDescriptor - Sorts items using a custom key extraction delegate (IKeyLookup) for flexible sorting logic.
Gets the collection of DataGridColumn objects currently unfrozen and displayed within the grid.
public ReadOnlyObservableCollection<DataGridColumn> UnfrozenColumns { get; }
Gets or sets the user edit mode of the DataGrid.
public DataGridUserEditMode UserEditMode { get; set; }
The can user edit.
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
public DataGridUserFilterMode UserFilterMode { get; set; }
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
public DataGridUserGroupMode UserGroupMode { get; set; }
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
public DataGridUserSortMode UserSortMode { get; set; }
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.
public double ViewportBufferHeight { get; set; }
The buffer height in device-independent units. The default value is 200.0.
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.
Gets the service that handles visual-state related logic, such as keeping track of the element that the mouse is currently over.
public DataGridVisualStateService VisualStateService { get; }
Methods
Generates FilterTapContext for the specified column.
public FilterTapContext CreateFilterTapContext(DataGridColumn column)
Clears the current selection state.
public void DeselectAll()
Removes the selection for the grid cell defined by the specified cell info.
Removes the selection for the specified data item and removes it from the SelectedItems collection.
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.
Retrieves the distinct values for a specified column that can be used for filtering operations.
public IEnumerable GetDistinctValues(DataGridColumn column, bool filterByOtherDescriptors)
The DataGridColumn for which to retrieve distinct values.
filterByOtherDescriptorsbooltrue 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.
An IEnumerable containing the distinct values for the specified column. These values represent the unique data that can appear in cells for this column.
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.
Invoked whenever the binding context of the element changes. Implement this method to add class handling for this event.
protected override void OnBindingContextChanged()
protected override void OnHandlerChanged()
protected override void OnPropertyChanged(string propertyName = null)
Scrolls the grid horizontally to bring the specified column into the visible viewport.
public void ScrollColumnIntoView(DataGridColumn column)
The DataGridColumn to scroll into view.
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.
Scrolls the grid to bring the specified data item into the visible viewport.
public void ScrollItemIntoView(object item)
The business object from the ItemsSource to scroll into view.
Exceptions:Thrown when item is null.
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.
Selects all the items as defined by the SelectionMode and SelectionUnit
public void SelectAll()
Selects the grid cell as defined by the specified cell info.
public void SelectCell(DataGridCellInfo item)
In order to select a cell, the SelectionUnit value should be DataGridSelectionUnit.Cell.
Selects the specified data item and adds it in the SelectedItems collection.
public void SelectItem(object item)
In order to select a Row, the SelectionUnit value should be DataGridSelectionUnit.Row.
Events
Occurs when the user requests to cancel the current AI processing operation.
public event EventHandler CancelPromptRequest
Occurs when the user drops the column, doesn't necessarily mean reorder will occur.
public event EventHandler<ColumnReorderCompletingEventArgs> ColumnReorderCompleting
Occurs when a column has been successfully reordered.
public event EventHandler<ColumnReorderedEventArgs> ColumnReordered
Occurs continuously while the column is being dragged.
public event EventHandler<ColumnReorderingEventArgs> ColumnReordering
Occurs when the user starts to drag a column to reorder it.
public event EventHandler<ColumnReorderStartingEventArgs> ColumnReorderStarting
Occurs when a column has been resized by user interaction.
public event EventHandler<ColumnUserResizeCompletedEventArgs> ColumnUserResizeCompleted
This event is raised after the RadDataGrid has arranged its content and finished painting.
public event EventHandler<DataGridContentPaintCompletedEventArgs> ContentPaintCompleted
Occurs when the CurrentCell property has changed.
public event EventHandler<CurrentCellChangedEventArgs> CurrentCellChanged
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.
public event EventHandler<DataBindingCompleteEventArgs> DataBindingComplete
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
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.
public event EventHandler<DistinctValuesLoadingEventArgs> DistinctValuesLoading
Fires when load on demand is requested.
public event EventHandler<LoadOnDemandEventArgs> LoadOnDemand
Occurs when a prompt is requested from the AI prompt panel.
public event EventHandler<DataGridPromptRequestEventArgs> PromptRequest
Occurs when the currently selected items change.
public event EventHandler<DataGridSelectionChangedEventArgs> SelectionChanged
Occurs when the set of items visible in the grid's viewport changes.
public event EventHandler<DataGridVisibleItemsChangedEventArgs> VisibleItemsChanged
This event is raised after the grid arranges its children and detects that items have scrolled in or out of the visible viewport. Use AddedItems to access items that became visible and RemovedItems to access items that are no longer visible.
The event is not raised when there is no net change to the set of visible items.