New to Telerik UI for .NET MAUIStart a free 30-day trial

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:

C#
public class RadDataGrid : RadLayout, ICommandService

Inheritance: objectRadLayoutRadDataGrid

Derived Classes: RadTreeDataGrid

Implements: ICommandService

Inherited Members RadLayout.CreateLayoutManager()

Constructors

Initializes a new instance of the RadDataGrid class.

C#
public RadDataGrid()

Fields

AIRequestFuncProperty

BindableProperty

Identifies the AIRequestFunc property.

C#
public static readonly BindableProperty AIRequestFuncProperty

AIResponseActionProperty

BindableProperty

Identifies the AIResponseAction property.

C#
public static readonly BindableProperty AIResponseActionProperty

AISettingsProperty

BindableProperty

Identifies the AISettings property.

C#
public static readonly BindableProperty AISettingsProperty

AIViewTemplateProperty

BindableProperty

Identifies the AIViewTemplate property.

C#
public static readonly BindableProperty AIViewTemplateProperty

Identifies the AlternateRowBackgroundStyle property.

C#
public static readonly BindableProperty AlternateRowBackgroundStyleProperty

Identifies the ApplyDataOperationsOnPropertyChange dependency property.

C#
public static readonly BindableProperty ApplyDataOperationsOnPropertyChangeProperty

Identifies the AreGroupHeadersClippedWhenFrozen property.

C#
public static readonly BindableProperty AreGroupHeadersClippedWhenFrozenProperty

Identifies the AreRowDetailsFrozen property.

C#
public static readonly BindableProperty AreRowDetailsFrozenProperty

AutoExpandGroupsProperty

BindableProperty

Identifies the AutoExpandGroups property.

C#
public static readonly BindableProperty AutoExpandGroupsProperty

Identifies the AutoGenerateColumns dependency property.

C#
public static readonly BindableProperty AutoGenerateColumnsProperty

BorderBrushProperty

BindableProperty

Identifies the BorderBrush property.

C#
public static readonly BindableProperty BorderBrushProperty

BorderThicknessProperty

BindableProperty

Identifies the BorderThickness property.

C#
public static readonly BindableProperty BorderThicknessProperty

Identifies the CanUserExpandMultipleRowDetails property.

C#
public static readonly BindableProperty CanUserExpandMultipleRowDetailsProperty

Identifies the CanUserReorderColumns property.

C#
public static readonly BindableProperty CanUserReorderColumnsProperty

Identifies the CanUserResizeColumns property.

C#
public static readonly BindableProperty CanUserResizeColumnsProperty

Identifies the ColumnHeaderDragVisualTemplate property.

C#
public static readonly BindableProperty ColumnHeaderDragVisualTemplateProperty

Identifies the ColumnReorderIndicatorTemplate property.

C#
public static readonly BindableProperty ColumnReorderIndicatorTemplateProperty

CurrentCellProperty

BindableProperty

Identifies the CurrentCell property.

C#
public static readonly BindableProperty CurrentCellProperty

CurrentCellStyleProperty

BindableProperty

Identifies the CurrentCellStyle property.

C#
public static readonly BindableProperty CurrentCellStyleProperty

Identifies the DataOperationIndicationMode property.

C#
public static readonly BindableProperty DataOperationIndicationModeProperty

DraggedObjectProperty

BindableProperty

Identifies the DraggedObject property.

C#
public static readonly BindableProperty DraggedObjectProperty

Identifies the EmptyContentDisplayMode property.

C#
public static readonly BindableProperty EmptyContentDisplayModeProperty

Identifies the EmptyContentTemplate property.

C#
public static readonly BindableProperty EmptyContentTemplateProperty

Identifies the ExpandedRowDetails property.

C#
public static readonly BindableProperty ExpandedRowDetailsProperty

Identifies the FilterDescriptors dependency property.

C#
public static readonly BindableProperty FilterDescriptorsProperty

Identifies the FrozenColumnsSplitterStyle property.

C#
public static readonly BindableProperty FrozenColumnsSplitterStyleProperty

GridLinesColorProperty

BindableProperty

Identifies the GridLinesColor property.

C#
public static readonly BindableProperty GridLinesColorProperty

Identifies the GridLinesThickness property.

C#
public static readonly BindableProperty GridLinesThicknessProperty

Identifies the GridLinesVisibility property.

C#
public static readonly BindableProperty GridLinesVisibilityProperty

Identifies the GroupAggregateCellStyle property.

C#
public static readonly BindableProperty GroupAggregateCellStyleProperty

Identifies the GroupAggregateCellStyleSelector property.

C#
public static readonly BindableProperty GroupAggregateCellStyleSelectorProperty

Identifies the GroupAggregateCellTemplate property.

C#
public static readonly BindableProperty GroupAggregateCellTemplateProperty

Identifies the GroupAggregatesAlignment dependency property.

C#
public static readonly BindableProperty GroupAggregatesAlignmentProperty

GroupDescriptorsProperty

BindableProperty

Identifies the GroupDescriptors dependency property.

C#
public static readonly BindableProperty GroupDescriptorsProperty

GroupFooterStyleProperty

BindableProperty

Identifies the GroupFooterStyle property.

C#
public static readonly BindableProperty GroupFooterStyleProperty

Identifies the GroupFooterStyleSelector property.

C#
public static readonly BindableProperty GroupFooterStyleSelectorProperty

Identifies the GroupFooterTemplate property.

C#
public static readonly BindableProperty GroupFooterTemplateProperty

GroupHeaderStyleProperty

BindableProperty

Identifies the GroupHeaderStyle property.

C#
public static readonly BindableProperty GroupHeaderStyleProperty

Identifies the GroupHeaderStyleSelector property.

C#
public static readonly BindableProperty GroupHeaderStyleSelectorProperty

Identifies the GroupHeaderTemplate property.

C#
public static readonly BindableProperty GroupHeaderTemplateProperty

Identifies the GroupHeaderTemplateSelector property.

C#
public static readonly BindableProperty GroupHeaderTemplateSelectorProperty

Identifies the GroupingPanelItemTemplate property.

C#
public static readonly BindableProperty GroupingPanelItemTemplateProperty

IsAIEnabledProperty

BindableProperty

Identifies the IsAIEnabled property.

C#
public static readonly BindableProperty IsAIEnabledProperty

IsBusyProperty

BindableProperty

Identifies the IsBusy property.

C#
public static readonly BindableProperty IsBusyProperty

ItemsSourceProperty

BindableProperty

Identifies the ItemsSource dependency property.

C#
public static readonly BindableProperty ItemsSourceProperty

Identifies the ListenForNestedPropertyChange property.

C#
public static readonly BindableProperty ListenForNestedPropertyChangeProperty

Identifies the LoadOnDemandAutoTemplate property.

C#
public static readonly BindableProperty LoadOnDemandAutoTemplateProperty

Identifies the LoadOnDemandBufferItemsCount property.

C#
public static readonly BindableProperty LoadOnDemandBufferItemsCountProperty

LoadOnDemandModeProperty

BindableProperty

Identifies the LoadOnDemandMode property.

C#
public static readonly BindableProperty LoadOnDemandModeProperty

Identifies the LoadOnDemandRowStyle property.

C#
public static readonly BindableProperty LoadOnDemandRowStyleProperty

Identifies the LoadOnDemandRowTemplate property.

C#
public static readonly BindableProperty LoadOnDemandRowTemplateProperty

MouseHoverStyleProperty

BindableProperty

Identifies the MouseHoverStyle property.

C#
public static readonly BindableProperty MouseHoverStyleProperty

RenderModeProperty

BindableProperty

Identifies the RenderMode property.

C#
public static readonly BindableProperty RenderModeProperty

Identifies the RowBackgroundStyle property.

C#
public static readonly BindableProperty RowBackgroundStyleProperty

Identifies the RowBackgroundStyleSelector property.

C#
public static readonly BindableProperty RowBackgroundStyleSelectorProperty

Identifies the RowDetailsTemplate property.

C#
public static readonly BindableProperty RowDetailsTemplateProperty

RowHeightProperty

BindableProperty

Identifies the RowHeight property.

C#
public static readonly BindableProperty RowHeightProperty

SearchPanelProperty

BindableProperty

Identifies the SearchPanel property.

C#
public static readonly BindableProperty SearchPanelProperty

SearchSettingsProperty

BindableProperty

Identifies the SearchSettings property.

C#
public static readonly BindableProperty SearchSettingsProperty

SelectedItemProperty

BindableProperty

Identifies the SelectedItem property.

C#
public static readonly BindableProperty SelectedItemProperty

SelectedItemsProperty

BindableProperty

Identifies the SelectedItems property.

C#
public static readonly BindableProperty SelectedItemsProperty

SelectionModeProperty

BindableProperty

Identifies the SelectionMode property.

C#
public static readonly BindableProperty SelectionModeProperty

SelectionStyleProperty

BindableProperty

Identifies the SelectionStyle property.

C#
public static readonly BindableProperty SelectionStyleProperty

SelectionUnitProperty

BindableProperty

Identifies the SelectionUnit property.

C#
public static readonly BindableProperty SelectionUnitProperty

ServicePanelProperty

BindableProperty

Identifies the ServicePanel property.

C#
public static readonly BindableProperty ServicePanelProperty

Identifies the ShowColumnFooters dependency property.

C#
public static readonly BindableProperty ShowColumnFootersProperty

Identifies the ShowColumnHeaders property.

C#
public static readonly BindableProperty ShowColumnHeadersProperty

ShowGroupFootersProperty

BindableProperty

Identifies the ShowGroupFooters dependency property.

C#
public static readonly BindableProperty ShowGroupFootersProperty

Identifies the ShowGroupHeaderAggregates dependency property.

C#
public static readonly BindableProperty ShowGroupHeaderAggregatesProperty

SortDescriptorsProperty

BindableProperty

Identifies the SortDescriptors dependency property.

C#
public static readonly BindableProperty SortDescriptorsProperty

UserEditModeProperty

BindableProperty

Identifies the UserEditMode property.

C#
public static readonly BindableProperty UserEditModeProperty

UserFilterModeProperty

BindableProperty

Identifies the UserFilterMode property.

C#
public static readonly BindableProperty UserFilterModeProperty

UserGroupModeProperty

BindableProperty

Identifies the UserGroupMode dependency property.

C#
public static readonly BindableProperty UserGroupModeProperty

UserSortModeProperty

BindableProperty

Identifies the UserSortMode dependency property.

C#
public static readonly BindableProperty UserSortModeProperty

Identifies the ViewportBufferHeight property.

C#
public static readonly BindableProperty ViewportBufferHeightProperty

Properties

Gets a function that creates an AI request from the current grid structure and a user prompt.

C#
public Func<string, string> AIRequestFunc { get; }
Remarks:

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.

C#
public Action<string> AIResponseAction { get; }
Remarks:

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.

C#
public DataGridAISettings AISettings { get; set; }
Remarks:

Supported type: DataGridAISettings.

AIViewTemplate

DataTemplate

Gets or sets the DataTemplate used visualize the AI view in the DataGrid.

C#
public DataTemplate AIViewTemplate { get; set; }

Gets or sets the Style that defines the appearance of an alternate row. The Style should target DataGridRowBackgroundAppearance.

C#
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.

C#
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.

C#
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.

C#
public bool AreRowDetailsFrozen { get; set; }

Gets or sets a value indicating whether newly added groups should be automatically expanded.

C#
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.

C#
public bool AutoGenerateColumns { get; set; }

Gets or sets the Brush of the border placed around the RadDataGrid control.

C#
public Brush BorderBrush { get; set; }

Gets or sets the thickness of the border placed around the RadDataGrid control.

C#
public Thickness BorderThickness { get; set; }

Gets or sets a value indicating whether multiple row details can be expanded.

C#
public bool CanUserExpandMultipleRowDetails { get; set; }

Gets or sets a value indicating whether the user can reorder the DataGridColumns in the RadDataGrid.

C#
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.

C#
public bool CanUserResizeColumns { get; set; }

Gets or sets the template that presents the drag visual of the dragged column header.

C#
public DataTemplate ColumnHeaderDragVisualTemplate { get; set; }

Gets or sets the template that presents the indicator that is shown between two columns during reordering.

C#
public DataTemplate ColumnReorderIndicatorTemplate { get; set; }

Gets the collection of DataGridColumn objects currently displayed within the grid.

C#
public DataGridColumnCollection Columns { get; }
Remarks:

Available DataGridColumn types include:

Gets the collection with all the custom commands registered with the CommandService. Custom commands have higher priority than the built-in (default) ones.

C#
public ObservableCollection<ControlCommandBase<RadDataGrid>> Commands { get; }
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:

  1. Custom commands are checked first based on their DataGridCommandId
  2. If no custom command matches or can execute, the default built-in command is used
  3. 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.

C#
public DataGridCommandService CommandService { get; }

Implements: ICommandService.CommandService

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.

Gets or sets the current cell of the RadDataGrid.

C#
public DataGridCellInfo CurrentCell { get; set; }

Gets or sets the Style that defines the appearance settings applied to the RadDataGrid's current cell. The Style should target DataGridCurrentCellAppearance.

C#
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.

C#
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.

Gets or sets a value that specifies when the EmptyContentTemplate will be displayed.

C#
public EmptyContentDisplayMode EmptyContentDisplayMode { get; set; }

Gets or sets the DataTemplate that defines the content of the view which is shown when there are no items.

C#
public DataTemplate EmptyContentTemplate { get; set; }

Gets or sets the collection of items that have expanded row details.

C#
public IList ExpandedRowDetails { get; set; }

Gets the collection of FilterDescriptorBase objects that defines the current filtering within this instance.

C#
public FilterDescriptorCollection FilterDescriptors { get; }
Remarks:

Available FilterDescriptorBase types include:

Gets the collection of DataGridColumn objects currently frozen and displayed within the grid.

C#
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.

C#
public Style FrozenColumnsSplitterStyle { get; set; }

Gets or sets the Color value that defines the appearance of grid's horizontal and vertical lines.

C#
public Color GridLinesColor { get; set; }

Gets or sets the width of the vertical grid lines and the height of the horizontal grid lines.

C#
public double GridLinesThickness { get; set; }

Gets or sets the GridLinesVisibility value that defines which grid lines are currently visible (displayed).

C#
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.

C#
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.

C#
public IStyleSelector GroupAggregateCellStyleSelector { get; set; }

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.

C#
public DataTemplate GroupAggregateCellTemplate { get; set; }

Gets or sets a value that indicates the alignment of the aggregates in the group according its header.

C#
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.

C#
public GroupDescriptorCollection GroupDescriptors { get; }
Remarks:

Available GroupDescriptorBase types include:

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.

C#
public Style GroupFooterStyle { get; set; }
Property Value:

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.

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.

C#
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.

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.

C#
public DataTemplate GroupFooterTemplate { get; set; }
Property Value:

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.

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.

C#
public Style GroupHeaderStyle { get; set; }
Property Value:

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.

C#
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.

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.

C#
public DataTemplate GroupHeaderTemplate { get; set; }
Property Value:

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

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.

C#
public DataTemplateSelector GroupHeaderTemplateSelector { get; set; }
Property Value:

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.

Gets or sets the item template of the DataGridGroupingPanel.

C#
public DataTemplate GroupingPanelItemTemplate { get; set; }

Gets the HitTestService instance that provides methods for retrieving rows and cells from a given physical location.

C#
public HitTestService HitTestService { get; }

Gets or sets a value indicating whether the AI functionality is enabled for the DataGrid.

C#
public bool IsAIEnabled { get; set; }
Remarks:

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.

C#
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.

Gets or sets the data provider.

C#
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.

C#
public bool ListenForNestedPropertyChange { get; set; }

Gets or sets the DataTemplate of the row that get visualized when the LoadOnDemandMode is Auto.

C#
public DataTemplate LoadOnDemandAutoTemplate { get; set; }

Gets or sets the incremental loading buffer items count.

C#
public int LoadOnDemandBufferItemsCount { get; set; }
Property Value:

The incremental loading buffer items count.

Gets or sets the load on demand mode.

C#
public LoadOnDemandMode LoadOnDemandMode { get; set; }

Gets or sets the Style instance that defines the appearance of the load more data row. The Style should target DataGridLoadOnDemandRowAppearance.

C#
public Style LoadOnDemandRowStyle { get; set; }

Gets or sets the DataTemplate of the row that get visualized when the LoadOnDemandMode is Manual.

C#
public DataTemplate LoadOnDemandRowTemplate { get; set; }

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.

C#
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).

C#
public DataGridRenderMode RenderMode { get; set; }

Gets or sets the Style for the appearance of each row. The Style should target DataGridRowBackgroundAppearance

C#
public Style RowBackgroundStyle { get; set; }

Gets or sets custom style-selection logic for a style that defines the appearance of each row.

C#
public IStyleSelector RowBackgroundStyleSelector { get; set; }

RowDetailsTemplate

DataTemplate

Gets or sets the DataTemplate or DataTemplateSelector used for displaying row details.

C#
public DataTemplate RowDetailsTemplate { get; set; }

Gets or sets the height of data rows in the grid.

C#
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.

Gets or sets the panel that contains search related views.

C#
public DataGridSearchPanel SearchPanel { get; set; }

Gets or sets the search settings that configure and control the DataGrid's built-in search experience.

C#
public DataGridSearchSettings SearchSettings { get; set; }
Remarks:

Supported type: DataGridSearchSettings.

Gets or sets the selected item of the DataGrid.

C#
public object SelectedItem { get; set; }
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.

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.

C#
public ObservableCollection<object> SelectedItems { get; }

Gets or sets the selection mode that determines how many items can be selected simultaneously.

C#
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.

Gets or sets the Style for the appearance applied to the RadDataGrid selection. The Style should target DataGridSelectionAppearance.

C#
public Style SelectionStyle { get; set; }

Gets or sets the selection unit that determines whether entire rows or individual cells can be selected.

C#
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.

Gets or sets the panel that contains various service related views such as the DataGridGroupingPanel.

C#
public DataGridServicePanel ServicePanel { get; set; }

Gets or sets a value indicating whether to show column footers.

C#
public bool ShowColumnFooters { get; set; }

Gets or sets a value indicating whether the column headers are visible or not.

C#
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.

C#
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).

Gets or sets a value indicating whether to show aggregates in the group headers.

C#
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.

C#
public SortDescriptorCollection SortDescriptors { get; }
Remarks:

Available SortDescriptorBase types include:

Gets the collection of DataGridColumn objects currently unfrozen and displayed within the grid.

C#
public ReadOnlyObservableCollection<DataGridColumn> UnfrozenColumns { get; }

Gets or sets the user edit mode of the DataGrid.

C#
public DataGridUserEditMode UserEditMode { get; set; }
Property Value:

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

C#
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

C#
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

C#
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.

C#
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.

Gets the service that handles visual-state related logic, such as keeping track of the element that the mouse is currently over.

C#
public DataGridVisualStateService VisualStateService { get; }

Methods

C#
protected virtual bool CanRebuildUI(UpdateFlags flags)
Parameters:flagsUpdateFlagsReturns:

bool

Generates FilterTapContext for the specified column.

C#
public FilterTapContext CreateFilterTapContext(DataGridColumn column)
Parameters:columnDataGridColumnReturns:

FilterTapContext

Clears the current selection state.

C#
public void DeselectAll()

Removes the selection for the grid cell defined by the specified cell info.

C#
public void DeselectCell(DataGridCellInfo item)
Parameters:itemDataGridCellInfo

Removes the selection for the specified data item and removes it from the SelectedItems collection.

C#
public void DeselectItem(object item)
Parameters:itemobject

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.

C#
public IDataViewCollection GetDataView()
Returns:

IDataViewCollection

Retrieves the distinct values for a specified column that can be used for filtering operations.

C#
public IEnumerable GetDistinctValues(DataGridColumn column, bool filterByOtherDescriptors)
Parameters:columnDataGridColumn

The DataGridColumn for which to retrieve distinct values.

filterByOtherDescriptorsbool

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:

IEnumerable

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.

Invoked whenever the binding context of the element changes. Implement this method to add class handling for this event.

C#
protected override void OnBindingContextChanged()
C#
protected override void OnHandlerChanged()
C#
protected override void OnPropertyChanged(string propertyName = null)
Parameters:propertyNamestring

Scrolls the grid horizontally to bring the specified column into the visible viewport.

C#
public void ScrollColumnIntoView(DataGridColumn column)
Parameters:columnDataGridColumn

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.

Scrolls the grid to bring the specified data item into the visible viewport.

C#
public void ScrollItemIntoView(object item)
Parameters:itemobject

The business object from the ItemsSource to scroll into view.

Exceptions:

ArgumentNullException

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.

Selects all the items as defined by the SelectionMode and SelectionUnit

C#
public void SelectAll()

Selects the grid cell as defined by the specified cell info.

C#
public void SelectCell(DataGridCellInfo item)
Parameters:itemDataGridCellInfo
Remarks:

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.

C#
public void SelectItem(object item)
Parameters:itemobject
Remarks:

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.

C#
public event EventHandler CancelPromptRequest

Occurs when the user drops the column, doesn't necessarily mean reorder will occur.

C#
public event EventHandler<ColumnReorderCompletingEventArgs> ColumnReorderCompleting

Occurs when a column has been successfully reordered.

C#
public event EventHandler<ColumnReorderedEventArgs> ColumnReordered

Occurs continuously while the column is being dragged.

C#
public event EventHandler<ColumnReorderingEventArgs> ColumnReordering

Occurs when the user starts to drag a column to reorder it.

C#
public event EventHandler<ColumnReorderStartingEventArgs> ColumnReorderStarting

Occurs when a column has been resized by user interaction.

C#
public event EventHandler<ColumnUserResizeCompletedEventArgs> ColumnUserResizeCompleted

This event is raised after the RadDataGrid has arranged its content and finished painting.

C#
public event EventHandler<DataGridContentPaintCompletedEventArgs> ContentPaintCompleted

Occurs when the CurrentCell property has changed.

C#
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.

C#
public event EventHandler<DataBindingCompleteEventArgs> DataBindingComplete
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

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.

C#
public event EventHandler<DistinctValuesLoadingEventArgs> DistinctValuesLoading

Fires when load on demand is requested.

C#
public event EventHandler<LoadOnDemandEventArgs> LoadOnDemand

Occurs when a prompt is requested from the AI prompt panel.

C#
public event EventHandler<DataGridPromptRequestEventArgs> PromptRequest

Occurs when the currently selected items change.

C#
public event EventHandler<DataGridSelectionChangedEventArgs> SelectionChanged

Occurs when the set of items visible in the grid's viewport changes.

C#
public event EventHandler<DataGridVisibleItemsChangedEventArgs> VisibleItemsChanged
Remarks:

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.

In this article
DefinitionConstructorsRadDataGrid()FieldsAIRequestFuncPropertyAIResponseActionPropertyAISettingsPropertyAIViewTemplatePropertyAlternateRowBackgroundStylePropertyApplyDataOperationsOnPropertyChangePropertyAreGroupHeadersClippedWhenFrozenPropertyAreRowDetailsFrozenPropertyAutoExpandGroupsPropertyAutoGenerateColumnsPropertyBorderBrushPropertyBorderThicknessPropertyCanUserExpandMultipleRowDetailsPropertyCanUserReorderColumnsPropertyCanUserResizeColumnsPropertyColumnHeaderDragVisualTemplatePropertyColumnReorderIndicatorTemplatePropertyCurrentCellPropertyCurrentCellStylePropertyDataOperationIndicationModePropertyDraggedObjectPropertyEmptyContentDisplayModePropertyEmptyContentTemplatePropertyExpandedRowDetailsPropertyFilterDescriptorsPropertyFrozenColumnsSplitterStylePropertyGridLinesColorPropertyGridLinesThicknessPropertyGridLinesVisibilityPropertyGroupAggregateCellStylePropertyGroupAggregateCellStyleSelectorPropertyGroupAggregateCellTemplatePropertyGroupAggregatesAlignmentPropertyGroupDescriptorsPropertyGroupFooterStylePropertyGroupFooterStyleSelectorPropertyGroupFooterTemplatePropertyGroupHeaderStylePropertyGroupHeaderStyleSelectorPropertyGroupHeaderTemplatePropertyGroupHeaderTemplateSelectorPropertyGroupingPanelItemTemplatePropertyIsAIEnabledPropertyIsBusyPropertyItemsSourcePropertyListenForNestedPropertyChangePropertyLoadOnDemandAutoTemplatePropertyLoadOnDemandBufferItemsCountPropertyLoadOnDemandModePropertyLoadOnDemandRowStylePropertyLoadOnDemandRowTemplatePropertyMouseHoverStylePropertyRenderModePropertyRowBackgroundStylePropertyRowBackgroundStyleSelectorPropertyRowDetailsTemplatePropertyRowHeightPropertySearchPanelPropertySearchSettingsPropertySelectedItemPropertySelectedItemsPropertySelectionModePropertySelectionStylePropertySelectionUnitPropertyServicePanelPropertyShowColumnFootersPropertyShowColumnHeadersPropertyShowGroupFootersPropertyShowGroupHeaderAggregatesPropertySortDescriptorsPropertyUserEditModePropertyUserFilterModePropertyUserGroupModePropertyUserSortModePropertyViewportBufferHeightPropertyPropertiesAIRequestFuncAIResponseActionAISettingsAIViewTemplateAlternateRowBackgroundStyleApplyDataOperationsOnPropertyChangeAreGroupHeadersClippedWhenFrozenAreRowDetailsFrozenAutoExpandGroupsAutoGenerateColumnsBorderBrushBorderThicknessCanUserExpandMultipleRowDetailsCanUserReorderColumnsCanUserResizeColumnsColumnHeaderDragVisualTemplateColumnReorderIndicatorTemplateColumnsCommandServiceCommandsCurrentCellCurrentCellStyleDataOperationIndicationModeEmptyContentDisplayModeEmptyContentTemplateExpandedRowDetailsFilterDescriptorsFrozenColumnsFrozenColumnsSplitterStyleGridLinesColorGridLinesThicknessGridLinesVisibilityGroupAggregateCellStyleGroupAggregateCellStyleSelectorGroupAggregateCellTemplateGroupAggregatesAlignmentGroupDescriptorsGroupFooterStyleGroupFooterStyleSelectorGroupFooterTemplateGroupHeaderStyleGroupHeaderStyleSelectorGroupHeaderTemplateGroupHeaderTemplateSelectorGroupingPanelItemTemplateHitTestServiceIsAIEnabledIsBusyItemsSourceListenForNestedPropertyChangeLoadOnDemandAutoTemplateLoadOnDemandBufferItemsCountLoadOnDemandModeLoadOnDemandRowStyleLoadOnDemandRowTemplateMouseHoverStyleRenderModeRowBackgroundStyleRowBackgroundStyleSelectorRowDetailsTemplateRowHeightSearchPanelSearchSettingsSelectedItemSelectedItemsSelectionModeSelectionStyleSelectionUnitServicePanelShowColumnFootersShowColumnHeadersShowGroupFootersShowGroupHeaderAggregatesSortDescriptorsUnfrozenColumnsUserEditModeUserFilterModeUserGroupModeUserSortModeViewportBufferHeightVisualStateServiceMethodsCanRebuildUI(UpdateFlags)CreateFilterTapContext(DataGridColumn)DeselectAll()DeselectCell(DataGridCellInfo)DeselectItem(object)GetDataView()GetDistinctValues(DataGridColumn, bool)OnBindingContextChanged()OnHandlerChanged()OnPropertyChanged(string)ScrollColumnIntoView(DataGridColumn)ScrollItemIntoView(object)SelectAll()SelectCell(DataGridCellInfo)SelectItem(object)EventsCancelPromptRequestColumnReorderCompletingColumnReorderStartingColumnReorderedColumnReorderingColumnUserResizeCompletedContentPaintCompletedCurrentCellChangedDataBindingCompleteDistinctValuesLoadingLoadOnDemandPromptRequestSelectionChangedVisibleItemsChanged
Not finding the help you need?
Contact Support