Class
RadDataGrid

Represents a custom Control implementation that may be used to visualize data in tabular format - that is by rows and columns.

Definition

Namespace:Telerik.UI.Xaml.Controls.Grid

Assembly:Telerik.WinUI.Controls.dll

Syntax:

cs-api-definition
public class RadDataGrid : RadControl, IView, IElementPresenter

Inheritance: objectRadControlRadDataGrid

Implements: IElementPresenterIView

Inherited Members RadControl.EndVisualStateUpdate(bool, bool)RadControl.UpdateVisualState(bool)RadControl.BeginVisualStateUpdate()RadControl.SetVisualState(string, bool)RadControl.CanUpdateVisualState()RadControl.ComposeVisualStateName()RadControl.MeasureOverride(Size)RadControl.ArrangeOverride(Size)RadControl.OnApplyTemplate()RadControl.OnIsEnabledChanged(bool, bool)RadControl.LoadCore()RadControl.OnLoaded()RadControl.UnloadCore()RadControl.CurrentVisualStateRadControl.IsLoadedRadControl.IsLoadingRadControl.IsUnloadedRadControl.WasUnloadedRadControl.IsTemplateApplied

Constructors

RadDataGrid()

Initializes a new instance of the RadDataGrid class.

Declaration

cs-api-definition
public RadDataGrid()

Fields

AggregateRowBackgroundProperty

Identifies the AggregateRowBackground dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty AggregateRowBackgroundProperty

Field Value

DependencyProperty

AlternateRowBackgroundProperty

Identifies the AlternateRowBackground dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty AlternateRowBackgroundProperty

Field Value

DependencyProperty

AlternationStartIndexProperty

Identifies the AlternationStartIndex dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty AlternationStartIndexProperty

Field Value

DependencyProperty

AlternationStepProperty

Identifies the AlternationStep dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty AlternationStepProperty

Field Value

DependencyProperty

AutoGenerateColumnsProperty

Identifies the AutoGenerateColumns dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty AutoGenerateColumnsProperty

Field Value

DependencyProperty

CanUserChooseColumnsProperty

Identifies the CanUserChooseColumns dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty CanUserChooseColumnsProperty

Field Value

DependencyProperty

ColumnDataOperationsModeProperty

Identifies the ColumnDataOperationsMode dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty ColumnDataOperationsModeProperty

Field Value

DependencyProperty

ColumnResizeHandleDisplayModeProperty

Identifies the ColumnResizeHandleDisplayMode dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty ColumnResizeHandleDisplayModeProperty

Field Value

DependencyProperty

CurrentItemProperty

Identifies the CurrentItem dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty CurrentItemProperty

Field Value

DependencyProperty

DragBehaviorProperty

Identifies the DragBehavior dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty DragBehaviorProperty

Field Value

DependencyProperty

EnsureCurrentItemIntoViewProperty

Identifies the EnsureCurrentItemIntoView dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty EnsureCurrentItemIntoViewProperty

Field Value

DependencyProperty

ExternalEditorProperty

Identifies the ExternalEditor dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty ExternalEditorProperty

Field Value

DependencyProperty

FrozenColumnCountProperty

Identifies the FrozenColumnCount dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty FrozenColumnCountProperty

Field Value

DependencyProperty

GridLinesBrushProperty

Identifies the GridLinesBrush dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty GridLinesBrushProperty

Field Value

DependencyProperty

GridLinesThicknessProperty

Identifies the GridLinesThickness dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty GridLinesThicknessProperty

Field Value

DependencyProperty

GridLinesVisibilityProperty

Identifies the GridLinesVisibility dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty GridLinesVisibilityProperty

Field Value

DependencyProperty

GroupHeaderDisplayModeProperty

Identifies the GroupHeaderDisplayMode dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty GroupHeaderDisplayModeProperty

Field Value

DependencyProperty

GroupHeaderStyleProperty

Identifies the GroupHeaderStyle dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty GroupHeaderStyleProperty

Field Value

DependencyProperty

GroupHeaderStyleSelectorProperty

Identifies the GroupHeaderStyleSelector dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty GroupHeaderStyleSelectorProperty

Field Value

DependencyProperty

GroupHeaderTemplateProperty

Identifies the GroupHeaderTemplate dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty GroupHeaderTemplateProperty

Field Value

DependencyProperty

GroupHeaderTemplateSelectorProperty

Identifies the GroupHeaderTemplateSelector dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty GroupHeaderTemplateSelectorProperty

Field Value

DependencyProperty

GroupPanelPositionProperty

Identifies the GroupPanelPosition dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty GroupPanelPositionProperty

Field Value

DependencyProperty

HideFlyoutOnBackButtonPressedProperty

Identifies the HideFlyoutOnBackButtonPressed dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty HideFlyoutOnBackButtonPressedProperty

Field Value

DependencyProperty

IncrementalLoadingModeProperty

Identifies the IncrementalLoadingMode dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty IncrementalLoadingModeProperty

Field Value

DependencyProperty

IndentWidthProperty

Identifies the IndentWidth dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty IndentWidthProperty

Field Value

DependencyProperty

IsBusyIndicatorEnabledProperty

Identifies the IsBusyIndicatorEnabled dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty IsBusyIndicatorEnabledProperty

Field Value

DependencyProperty

IsSynchronizedWithCurrentItemProperty

Identifies the IsSynchronizedWithCurrentItem dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty IsSynchronizedWithCurrentItemProperty

Field Value

DependencyProperty

ItemsSourceProperty

Identifies the ItemsSource dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty ItemsSourceProperty

Field Value

DependencyProperty

ListenForNestedPropertyChangeProperty

Identifies the ListenForNestedPropertyChange dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty ListenForNestedPropertyChangeProperty

Field Value

DependencyProperty

RealizedItemsBufferScaleProperty

Identifies the RealizedItemsVerticalBufferScale dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty RealizedItemsBufferScaleProperty

Field Value

DependencyProperty

RowBackgroundProperty

Identifies the AlternateRowBackground dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty RowBackgroundProperty

Field Value

DependencyProperty

RowBackgroundSelectorProperty

Identifies the RowBackgroundSelector dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty RowBackgroundSelectorProperty

Field Value

DependencyProperty

RowDetailsDisplayModeProperty

Identifies the RowDetailsDisplayMode dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty RowDetailsDisplayModeProperty

Field Value

DependencyProperty

RowDetailsTemplateProperty

Identifies the RowDetailsTemplate dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty RowDetailsTemplateProperty

Field Value

DependencyProperty

RowHeightProperty

Identifies the RowHeight dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty RowHeightProperty

Field Value

DependencyProperty

SelectedItemProperty

Identifies the SelectedItem dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty SelectedItemProperty

Field Value

DependencyProperty

SelectionModeProperty

Identifies the SelectionMode dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty SelectionModeProperty

Field Value

DependencyProperty

SelectionUnitProperty

Identifies the SelectionUnit dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty SelectionUnitProperty

Field Value

DependencyProperty

UserColumnReorderModeProperty

Identifies the UserColumnReorderMode dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty UserColumnReorderModeProperty

Field Value

DependencyProperty

UserEditModeProperty

Identifies the UserEditMode dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty UserEditModeProperty

Field Value

DependencyProperty

UserFilterModeProperty

Identifies the UserGroupMode dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty UserFilterModeProperty

Field Value

DependencyProperty

UserGroupModeProperty

Identifies the UserGroupMode dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty UserGroupModeProperty

Field Value

DependencyProperty

UserSortModeProperty

Identifies the UserSortMode dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty UserSortModeProperty

Field Value

DependencyProperty

Properties

AggregateDescriptors

Gets the collection of AggregateDescriptorBase objects that defines the current aggregate functions to be applied when the data view is computed.

Declaration

cs-api-definition
public AggregateDescriptorCollection AggregateDescriptors { get; }

Property Value

AggregateDescriptorCollection

AggregateRowBackground

Gets or sets the Brush that defines the fill of each aggregate row.

Declaration

cs-api-definition
public Brush AggregateRowBackground { get; set; }

Property Value

Brush

AlternateRowBackground

Gets or sets the Brush that defines the fill of the alternate rows, as defined by the AlternationStep property.

Declaration

cs-api-definition
public Brush AlternateRowBackground { get; set; }

Property Value

Brush

AlternationStartIndex

Gets or sets the zero-based index of the row which is considered as alternation start.

Declaration

cs-api-definition
public int AlternationStartIndex { get; set; }

Property Value

int

AlternationStep

Gets or sets the step between each two alternate rows. The Modulus (%) operand is applied over this value.

Declaration

cs-api-definition
public int AlternationStep { get; set; }

Property Value

int

AutoGenerateColumns

Gets or sets a value indicating whether grid's columns will be auto-generated from the provided ViewModel's properties.

Declaration

cs-api-definition
public bool AutoGenerateColumns { get; set; }

Property Value

bool

CanUserChooseColumns

Gets or sets a value indicating whether the user is allowed to choose which columns are visible.

Declaration

cs-api-definition
public bool CanUserChooseColumns { get; set; }

Property Value

bool

ColumnDataOperationsMode

Gets or sets the Data Operations Mode of the ColumnHeader.

Declaration

cs-api-definition
public ColumnDataOperationsMode ColumnDataOperationsMode { get; set; }

Property Value

ColumnDataOperationsMode

ColumnResizeHandleDisplayMode

Gets or sets the DataGridColumnResizeHandleDisplayMode value that defines how User Input (dragging column resize thumb) affects the current column size in the grid. The default value is DataGridColumnResizeHandleDisplayMode.OnHold

Declaration

cs-api-definition
public DataGridColumnResizeHandleDisplayMode ColumnResizeHandleDisplayMode { get; set; }

Property Value

DataGridColumnResizeHandleDisplayMode

Example

XAML

csharp
<telerikGrid:RadDataGrid x:Name="dataGrid" ColumnResizeHandleDisplayMode="None"/>

C#

csharp
this.dataGrid.ColumnResizeHandleDisplayMode = DataGridColumnResizeHandleDisplayMode.None;

Columns

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

Declaration

cs-api-definition
public DataGridColumnCollection Columns { get; }

Property Value

DataGridColumnCollection

CommandService

Gets the CommandService instance that manages the commanding behavior of this instance.

Declaration

cs-api-definition
public CommandService CommandService { get; }

Property Value

CommandService

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

cs-api-definition
public CommandCollection<RadDataGrid> Commands { get; }

Property Value

CommandCollection<RadDataGrid>

CurrentItem

Gets the object instance from the ItemsSource that is currently considered as Current.

Declaration

cs-api-definition
public object CurrentItem { get; }

Property Value

object

DragBehavior

Gets or sets the behavior controlling drag operations inside the DataGrid.

Declaration

cs-api-definition
public DataGridDragBehavior DragBehavior { get; set; }

Property Value

DataGridDragBehavior

EnsureCurrentItemIntoView

Gets or sets a value indicating whether the CurrentItem should always be automatically scrolled into view.

Declaration

cs-api-definition
public bool EnsureCurrentItemIntoView { get; set; }

Property Value

bool

ExternalEditor

Gets or sets external editor of the DataGrid.

Declaration

cs-api-definition
public IGridExternalEditor ExternalEditor { get; set; }

Property Value

IGridExternalEditor

FilterDescriptors

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

Declaration

cs-api-definition
public FilterDescriptorCollection FilterDescriptors { get; }

Property Value

FilterDescriptorCollection

FrozenColumnCount

Gets or sets the count of the frozen columns.

Declaration

cs-api-definition
public int FrozenColumnCount { get; set; }

Property Value

int

GridLinesBrush

Gets or sets the Brush value that defines the appearance of grid's horizontal lines.

Declaration

cs-api-definition
public Brush GridLinesBrush { get; set; }

Property Value

Brush

GridLinesThickness

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

Declaration

cs-api-definition
public double GridLinesThickness { get; set; }

Property Value

double

GridLinesVisibility

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

Declaration

cs-api-definition
public GridLinesVisibility GridLinesVisibility { get; set; }

Property Value

GridLinesVisibility

GroupDescriptors

Gets the collection of GroupDescriptorBase objects that defines the current grouping within this instance. Multiple group descriptors define multiple group levels.

Declaration

cs-api-definition
public GroupDescriptorCollection GroupDescriptors { get; }

Property Value

GroupDescriptorCollection

GroupHeaderDisplayMode

Gets or sets the DataGridGroupHeaderDisplayMode value that determines how group headers are displayed. The default value is DataGridGroupHeaderDisplayMode.Frozen

Declaration

cs-api-definition
public DataGridGroupHeaderDisplayMode GroupHeaderDisplayMode { get; set; }

Property Value

DataGridGroupHeaderDisplayMode

Example

XAML

csharp
<telerikGrid:RadDataGrid x:Name="dataGrid" GroupHeaderDisplayMode="Scrollable"/>

C#

csharp
this.dataGrid.GroupHeaderDisplayMode = DataGridGroupHeaderDisplayMode.Scrollable;

GroupHeaderStyle

Gets or sets the Style instance that defines the appearance of all the group headers within the grid. The style instance should target the DataGridGroupHeader type.

Declaration

cs-api-definition
public Style GroupHeaderStyle { get; set; }

Property Value

Style

Example

XAML

csharp
<Style TargetType="GridPrimitives:DataGridGroupHeader">
      <Setter Property="Foreground" Value="Red"/>
 </Style>

GroupHeaderStyleSelector

Gets or sets the StyleSelector instance that may be used to select different styles on a per group header basis. The style instance returned should target the DataGridGroupHeader type.

Declaration

cs-api-definition
public StyleSelector GroupHeaderStyleSelector { get; set; }

Property Value

StyleSelector

Example

C#

csharp
    public class CustomStyleSelector : StyleSelector
{
public Style ExpandedStyle {get;set;}
public Style CollapsedStyle {get;set;}
protected override Style SelectStyleCore(object item, DependencyObject container)
{
   if ((item as GroupHeaderContext).IsExpanded == true) { return this.ExpandedStyle;} else{ return this.CollapsedStyle;}
}
}

GroupHeaderTemplate

Gets or sets the DataTemplate instance that defines the appearance of each group header within the grid. The data context of each group header will be a GroupHeaderContext instance.

Declaration

cs-api-definition
public DataTemplate GroupHeaderTemplate { get; set; }

Property Value

DataTemplate

Example

XAML

csharp
<telerikGrid:RadDataGrid.GroupHeaderTemplate>
     <DataTemplate>
         <TextBlock Text="{Binding Level}" FontSize="26"/>
     </DataTemplate>
  </telerikGrid:RadDataGrid.GroupHeaderTemplate>

GroupHeaderTemplateSelector

Gets or sets the DataTemplateSelector instance that may be used to select group header template on a per header instance basis. The "Item" parameter of the method will be a GroupHeaderContext instance.

Declaration

cs-api-definition
public DataTemplateSelector GroupHeaderTemplateSelector { get; set; }

Property Value

DataTemplateSelector

Example

C#

csharp
public class CustomDataTemplateSelector : DataTemplateSelector
{
   public DataTemplate ExpandedTemplate { get; set; }
   public DataTemplate CollapsedTemplate { get; set; }
   protected override DataTemplate SelectTemplateCore(object item, Microsoft.UI.Xaml.DependencyObject container)
   {
       if ((item as GroupHeaderContext).IsExpanded == true) { return this.ExpandedTemplate; } else { return this.CollapsedTemplate; }
   }
}

GroupPanelPosition

Gets or sets the position of the Group Panel related to the DataGrid.

Declaration

cs-api-definition
public GroupPanelPosition GroupPanelPosition { get; set; }

Property Value

GroupPanelPosition

HideFlyoutOnBackButtonPressed

Gets or sets a value indicating whether information if the flyout should be hidden when the back Button gets pressed.

Declaration

cs-api-definition
public bool HideFlyoutOnBackButtonPressed { get; set; }

Property Value

bool

HitTestService

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

Declaration

cs-api-definition
public HitTestService HitTestService { get; }

Property Value

HitTestService

IncrementalLoadingMode

Gets or sets the incremental loading mode.

Declaration

cs-api-definition
public BatchLoadingMode IncrementalLoadingMode { get; set; }

Property Value

BatchLoadingMode

The incremental loading mode.

IndentWidth

Gets or sets a value that is used to offset different levels of nested groups. The default value is 24.

Declaration

cs-api-definition
public double IndentWidth { get; set; }

Property Value

double

IsBusyIndicatorEnabled

Gets or sets a value indicating whether the built-in BusyIndicator control is enabled. If true, the Grid will display an indeterminate progress indicator while it is processing some background requests like filtering, sorting or grouping.

Declaration

cs-api-definition
public bool IsBusyIndicatorEnabled { get; set; }

Property Value

bool

IsSynchronizedWithCurrentItem

Gets or sets a value indicating whether the SelectedItem and CurrentItem are synchronized.

Declaration

cs-api-definition
public bool IsSynchronizedWithCurrentItem { get; set; }

Property Value

bool

ItemsSource

Gets or sets the data provider.

Declaration

cs-api-definition
public object ItemsSource { get; set; }

Property Value

object

ListenForNestedPropertyChange

Gets or sets a value indicating whether the DataGrid should be updated if INotifyPropertyChanged item from its source is changed.

Declaration

cs-api-definition
public bool ListenForNestedPropertyChange { get; set; }

Property Value

bool

RealizedItemsVerticalBufferScale

Gets or sets the relative to viewport size buffer scale that will be used to realize items outside viewport. Default value is 1.

Declaration

cs-api-definition
public double RealizedItemsVerticalBufferScale { get; set; }

Property Value

double

RowBackground

Gets or sets the Brush that defines the fill of each row.

Declaration

cs-api-definition
public Brush RowBackground { get; set; }

Property Value

Brush

RowBackgroundSelector

Gets or sets the ObjectSelector<T> that may be used to provide conditional fill for grid rows.

Declaration

cs-api-definition
public ObjectSelector<Brush> RowBackgroundSelector { get; set; }

Property Value

ObjectSelector<Brush>

RowDetailsDisplayMode

Gets or sets the display mode for the row details - whether they should be visualized or not.

Declaration

cs-api-definition
public DataGridRowDetailsMode RowDetailsDisplayMode { get; set; }

Property Value

DataGridRowDetailsMode

RowDetailsTemplate

Gets or sets the Template of the row details.

Declaration

cs-api-definition
public DataTemplate RowDetailsTemplate { get; set; }

Property Value

DataTemplate

RowHeight

Gets or sets the standard height of rows in the control. The default value is NaN (auto).

Declaration

cs-api-definition
public double RowHeight { get; set; }

Property Value

double

SelectedItem

Gets or sets the selected item of the DataGrid.

Declaration

cs-api-definition
public object SelectedItem { get; set; }

Property Value

object

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

cs-api-definition
public BindableCollection<object> SelectedItems { get; }

Property Value

BindableCollection<object>

SelectionMode

Gets or sets the selection mode of the DataGrid. The default value is DataGridSelectionMode.Single.

Declaration

cs-api-definition
public DataGridSelectionMode SelectionMode { get; set; }

Property Value

DataGridSelectionMode

Example

XAML

csharp
<telerikGrid:RadDataGrid x:Name="dataGrid" SelectionMode="Multiple"/>

C#

csharp
this.dataGrid.SelectionMode = DataGridSelectionMode.Multiple;

SelectionUnit

Gets or sets the selection unit of the DataGrid. The default value is DataGridSelectionUnit.Row

Declaration

cs-api-definition
public DataGridSelectionUnit SelectionUnit { get; set; }

Property Value

DataGridSelectionUnit

Example

XAML

csharp
<telerikGrid:RadDataGrid x:Name="dataGrid" SelectionUnit="Cell"/>

C#

csharp
this.dataGrid.SelectionUnit = DataGridSelectionUnit.Cell;

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

cs-api-definition
public SortDescriptorCollection SortDescriptors { get; }

Property Value

SortDescriptorCollection

UserColumnReorderMode

Gets or sets the DataGridUserColumnReorderMode value that defines how User Input (dragging column header over another headers) affects the current column position in the grid. The default value is DataGridUserColumnReorderMode.Interactive

Declaration

cs-api-definition
public DataGridUserColumnReorderMode UserColumnReorderMode { get; set; }

Property Value

DataGridUserColumnReorderMode

Example

XAML

csharp
<telerikGrid:RadDataGrid x:Name="dataGrid" UserColumnReorderMode="None"/>

C#

csharp
this.dataGrid.UserColumnReorderMode = DataGridUserColumnReorderMode.None;

UserEditMode

Gets or sets the user edit mode of the DataGrid.

Declaration

cs-api-definition
public DataGridUserEditMode UserEditMode { get; set; }

Property Value

DataGridUserEditMode

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

cs-api-definition
public DataGridUserFilterMode UserFilterMode { get; set; }

Property Value

DataGridUserFilterMode

Example

XAML

csharp
<telerikGrid:RadDataGrid x:Name="dataGrid" UserFilterMode="Disabled"/>

C#

csharp
this.dataGrid.UserFilterMode = DataGridUserFilterMode.Disabled;

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

cs-api-definition
public DataGridUserGroupMode UserGroupMode { get; set; }

Property Value

DataGridUserGroupMode

Example

XAML

csharp
<telerikGrid:RadDataGrid x:Name="dataGrid" UserGroupMode="Disabled"/>

C#

csharp
this.dataGrid.UserGroupMode = DataGridUserGroupMode.Disabled

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

cs-api-definition
public DataGridUserSortMode UserSortMode { get; set; }

Property Value

DataGridUserSortMode

Example

XAML

csharp
<telerikGrid:RadDataGrid x:Name="dataGrid" UserSortMode="None"/>

C#

csharp
this.dataGrid.UserSortMode = DataGridUserSortMode.None;

Methods

ApplyTemplateCore()

Called when the Framework is called. Inheritors should override this method should they have some custom template-related logic. This is done to ensure that the property is properly initialized.

Declaration

cs-api-definition
protected override bool ApplyTemplateCore()

Returns

bool

Overrides RadControl.ApplyTemplateCore()

BeginEdit(object)

Begins the edit operation for the specified data item.

Declaration

cs-api-definition
public bool BeginEdit(object item)

Parameters

item

object

The data item.

Returns

bool

CancelEdit()

Cancels the current edit operation.

Declaration

cs-api-definition
public bool CancelEdit()

Returns

bool

CommitEdit()

Commits the current edit operation.

Declaration

cs-api-definition
public bool CommitEdit()

Returns

bool

DeselectAll()

Clears the current selection state.

Declaration

cs-api-definition
public void DeselectAll()

DeselectCell(DataGridCellInfo)

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

Declaration

cs-api-definition
public void DeselectCell(DataGridCellInfo item)

Parameters

item

DataGridCellInfo

DeselectItem(object)

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

Declaration

cs-api-definition
public void DeselectItem(object item)

Parameters

item

object

GetDataView()

Gets the IDataView instance that can be used to traverse and/or manipulate the data after all the Sort, Group and Filter operations are applied.

Declaration

cs-api-definition
public IDataView GetDataView()

Returns

IDataView

HideRowDetailsForItem(object)

Hide the row details.

Declaration

cs-api-definition
public void HideRowDetailsForItem(object item)

Parameters

item

object

The item for which the row details should be hide.

OnCreateAutomationPeer()

Declaration

cs-api-definition
protected override AutomationPeer OnCreateAutomationPeer()

Returns

AutomationPeer

Overrides RadControl.OnCreateAutomationPeer()

OnKeyDown(KeyRoutedEventArgs)

Called before the KeyDown event occurs.

Declaration

cs-api-definition
protected override void OnKeyDown(KeyRoutedEventArgs e)

Parameters

e

KeyRoutedEventArgs

The data for the event.

OnTemplateApplied()

Occurs when the method has been called and the template is already successfully applied.

Declaration

cs-api-definition
protected override void OnTemplateApplied()

Overrides RadControl.OnTemplateApplied()

ScrollColumnIntoView(DataGridColumn)

Attempts to bring the specified DataGridColumn into view asynchronously.

Declaration

cs-api-definition
public void ScrollColumnIntoView(DataGridColumn column)

Parameters

column

DataGridColumn

The column to attempt to scroll to.

ScrollColumnIntoView(DataGridColumn, Action)

Attempts to bring the specified DataGridColumn into view asynchronously.

Declaration

cs-api-definition
public void ScrollColumnIntoView(DataGridColumn column, Action scrollCompletedAction)

Parameters

column

DataGridColumn

The column.

scrollCompletedAction

Action

Arbitrary action that may be executed after the asynchronous update is executed.

ScrollIndexIntoView(int)

Attempts to bring the data item at the specified zero-based index into view asynchronously.

Declaration

cs-api-definition
public void ScrollIndexIntoView(int index)

Parameters

index

int

The zero-based index of the item to scroll.

ScrollIndexIntoView(int, Action)

Attempts to bring the data item at the specified zero-based index into view asynchronously.

Declaration

cs-api-definition
public void ScrollIndexIntoView(int index, Action scrollCompletedAction)

Parameters

index

int

The zero-based index of the item to scroll.

scrollCompletedAction

Action

Arbitrary action that may be executed after the asynchronous update is executed.

ScrollItemIntoView(object)

Attempts to bring the specified data item into view asynchronously.

Declaration

cs-api-definition
public void ScrollItemIntoView(object item)

Parameters

item

object

The data item to scroll to.

ScrollItemIntoView(object, Action)

Attempts to bring the specified data item into view asynchronously.

Declaration

cs-api-definition
public void ScrollItemIntoView(object item, Action scrollCompletedAction)

Parameters

item

object

The data item to scroll to.

scrollCompletedAction

Action

Arbitrary action that may be executed after the asynchronous update is executed.

SelectAll()

Selects all the items as defined by the SelectionMode and SelectionUnit

Declaration

cs-api-definition
public void SelectAll()

SelectCell(DataGridCellInfo)

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

Declaration

cs-api-definition
public void SelectCell(DataGridCellInfo item)

Parameters

item

DataGridCellInfo

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

cs-api-definition
public void SelectItem(object item)

Parameters

item

object

Remarks

In order to select a Row, the SelectionUnit value should be DataGridSelectionUnit.Row.

ShowRowDetailsForItem(object)

Show the row details.

Declaration

cs-api-definition
public void ShowRowDetailsForItem(object item)

Parameters

item

object

The item that should have its row details visualized.

UnapplyTemplateCore()

Removes the current control template. Occurs when a template has already been applied and a new one is applied.

Declaration

cs-api-definition
protected override void UnapplyTemplateCore()

Overrides RadControl.UnapplyTemplateCore()

Events

AsyncExportCompleted

Occurs when an async export operation is completed.

Declaration

cs-api-definition
public event AsyncCompletedEventHandler AsyncExportCompleted

Event Value

AsyncCompletedEventHandler

AsyncExportProgressChanged

Occurs when the progress of an async export operation changes.

Declaration

cs-api-definition
public event ProgressChangedEventHandler AsyncExportProgressChanged

Event Value

ProgressChangedEventHandler

CurrentItemChanged

Occurs when the CurrentItem property has changed.

Declaration

cs-api-definition
public event EventHandler CurrentItemChanged

Event Value

EventHandler

CurrentItemChanging

Occurs when the CurrentItem property is about to change. The event may be canceled to prevent the actual change.

Declaration

cs-api-definition
public event CurrentChangingEventHandler CurrentItemChanging

Event Value

CurrentChangingEventHandler

DataBindingComplete

Occurs when the associated data (ItemsSource) has been successfully bound to the control or any data operation like Group, Sort or Filter is applied. This event is useful if an additional action is required once the data is ready to be visualized.

Declaration

cs-api-definition
public event EventHandler<DataBindingCompleteEventArgs> DataBindingComplete

Event Value

EventHandler<DataBindingCompleteEventArgs>

ElementExported

Occurs after an element is exported.

Declaration

cs-api-definition
public event EventHandler<DataGridElementExportedEventArgs> ElementExported

Event Value

EventHandler<DataGridElementExportedEventArgs>

ElementExporting

Occurs before an element is exported.

Declaration

cs-api-definition
public event EventHandler<DataGridElementExportingEventArgs> ElementExporting

Event Value

EventHandler<DataGridElementExportingEventArgs>

SelectionChanged

Occurs when the currently selected items change.

Declaration

cs-api-definition
public event EventHandler<DataGridSelectionChangedEventArgs> SelectionChanged

Event Value

EventHandler<DataGridSelectionChangedEventArgs>

Extension Methods

In this article
DefinitionConstructorsRadDataGrid()FieldsAggregateRowBackgroundPropertyAlternateRowBackgroundPropertyAlternationStartIndexPropertyAlternationStepPropertyAutoGenerateColumnsPropertyCanUserChooseColumnsPropertyColumnDataOperationsModePropertyColumnResizeHandleDisplayModePropertyCurrentItemPropertyDragBehaviorPropertyEnsureCurrentItemIntoViewPropertyExternalEditorPropertyFrozenColumnCountPropertyGridLinesBrushPropertyGridLinesThicknessPropertyGridLinesVisibilityPropertyGroupHeaderDisplayModePropertyGroupHeaderStylePropertyGroupHeaderStyleSelectorPropertyGroupHeaderTemplatePropertyGroupHeaderTemplateSelectorPropertyGroupPanelPositionPropertyHideFlyoutOnBackButtonPressedPropertyIncrementalLoadingModePropertyIndentWidthPropertyIsBusyIndicatorEnabledPropertyIsSynchronizedWithCurrentItemPropertyItemsSourcePropertyListenForNestedPropertyChangePropertyRealizedItemsBufferScalePropertyRowBackgroundPropertyRowBackgroundSelectorPropertyRowDetailsDisplayModePropertyRowDetailsTemplatePropertyRowHeightPropertySelectedItemPropertySelectionModePropertySelectionUnitPropertyUserColumnReorderModePropertyUserEditModePropertyUserFilterModePropertyUserGroupModePropertyUserSortModePropertyPropertiesAggregateDescriptorsAggregateRowBackgroundAlternateRowBackgroundAlternationStartIndexAlternationStepAutoGenerateColumnsCanUserChooseColumnsColumnDataOperationsModeColumnResizeHandleDisplayModeColumnsCommandServiceCommandsCurrentItemDragBehaviorEnsureCurrentItemIntoViewExternalEditorFilterDescriptorsFrozenColumnCountGridLinesBrushGridLinesThicknessGridLinesVisibilityGroupDescriptorsGroupHeaderDisplayModeGroupHeaderStyleGroupHeaderStyleSelectorGroupHeaderTemplateGroupHeaderTemplateSelectorGroupPanelPositionHideFlyoutOnBackButtonPressedHitTestServiceIncrementalLoadingModeIndentWidthIsBusyIndicatorEnabledIsSynchronizedWithCurrentItemItemsSourceListenForNestedPropertyChangeRealizedItemsVerticalBufferScaleRowBackgroundRowBackgroundSelectorRowDetailsDisplayModeRowDetailsTemplateRowHeightSelectedItemSelectedItemsSelectionModeSelectionUnitSortDescriptorsUserColumnReorderModeUserEditModeUserFilterModeUserGroupModeUserSortModeMethodsApplyTemplateCore()BeginEdit(object)CancelEdit()CommitEdit()DeselectAll()DeselectCell(DataGridCellInfo)DeselectItem(object)GetDataView()HideRowDetailsForItem(object)OnCreateAutomationPeer()OnKeyDown(KeyRoutedEventArgs)OnTemplateApplied()ScrollColumnIntoView(DataGridColumn)ScrollColumnIntoView(DataGridColumn, Action)ScrollIndexIntoView(int)ScrollIndexIntoView(int, Action)ScrollItemIntoView(object)ScrollItemIntoView(object, Action)SelectAll()SelectCell(DataGridCellInfo)SelectItem(object)ShowRowDetailsForItem(object)UnapplyTemplateCore()EventsAsyncExportCompletedAsyncExportProgressChangedCurrentItemChangedCurrentItemChangingDataBindingCompleteElementExportedElementExportingSelectionChangedExtension Methods
Not finding the help you need?
Contact Support