Class RadDataGrid
Represents a custom Xamarin.Forms.View implementation that may be used to visualize data in tabular format - that is by rows and columns.
Inherited Members
Namespace: Telerik.XamarinForms.DataGrid
Assembly: Telerik.XamarinForms.DataGrid.dll
Syntax
public class RadDataGrid : RadLayout<View>, IGridView, IView, IElementPresenter, IUpdateServiceProvider<UpdateFlags>, ICommandService, ISelectionService, IEditingService
Constructors
RadDataGrid()
Fields
AlternateRowBackgroundStyleProperty
Identifies the AlternateRowBackgroundStyle property.
Declaration
public static readonly BindableProperty AlternateRowBackgroundStyleProperty
Field Value
Xamarin.Forms.BindableProperty
|
AutoGenerateColumnsProperty
Identifies the AutoGenerateColumns dependency property.
Declaration
public static readonly BindableProperty AutoGenerateColumnsProperty
Field Value
Xamarin.Forms.BindableProperty
|
DataOperationIndicationModeProperty
Identifies the DataOperationIndicationMode property.
Declaration
public static readonly BindableProperty DataOperationIndicationModeProperty
Field Value
Xamarin.Forms.BindableProperty
|
EmptyContentDisplayModeProperty
Identifies the EmptyContentDisplayMode property.
Declaration
public static readonly BindableProperty EmptyContentDisplayModeProperty
Field Value
Xamarin.Forms.BindableProperty
|
EmptyContentTemplateProperty
Identifies the EmptyContentTemplate property.
Declaration
public static readonly BindableProperty EmptyContentTemplateProperty
Field Value
Xamarin.Forms.BindableProperty
|
GridLinesColorProperty
Identifies the GridLinesColor property.
Declaration
public static readonly BindableProperty GridLinesColorProperty
Field Value
Xamarin.Forms.BindableProperty
|
GridLinesThicknessProperty
Identifies the GridLinesThickness property.
Declaration
public static readonly BindableProperty GridLinesThicknessProperty
Field Value
Xamarin.Forms.BindableProperty
|
GridLinesVisibilityProperty
Identifies the GridLinesVisibility property.
Declaration
public static readonly BindableProperty GridLinesVisibilityProperty
Field Value
Xamarin.Forms.BindableProperty
|
GroupFooterStyleProperty
GroupFooterStyleSelectorProperty
GroupFooterTemplateProperty
GroupHeaderStyleProperty
Identifies the GroupHeaderStyle property.
Declaration
public static readonly BindableProperty GroupHeaderStyleProperty
Field Value
Xamarin.Forms.BindableProperty
|
GroupHeaderStyleSelectorProperty
Identifies the GroupHeaderStyleSelector property.
Declaration
public static readonly BindableProperty GroupHeaderStyleSelectorProperty
Field Value
Xamarin.Forms.BindableProperty
|
GroupHeaderTemplateProperty
Identifies the GroupHeaderTemplate property.
Declaration
public static readonly BindableProperty GroupHeaderTemplateProperty
Field Value
Xamarin.Forms.BindableProperty
|
GroupHeaderTemplateSelectorProperty
Identifies the GroupHeaderTemplateSelector property.
Declaration
public static readonly BindableProperty GroupHeaderTemplateSelectorProperty
Field Value
Xamarin.Forms.BindableProperty
|
IsBusyProperty
Identifies the IsBusy property.
Declaration
public static readonly BindableProperty IsBusyProperty
Field Value
Xamarin.Forms.BindableProperty
|
ItemsSourceProperty
Identifies the ItemsSource dependency property.
Declaration
public static readonly BindableProperty ItemsSourceProperty
Field Value
Xamarin.Forms.BindableProperty
|
ListenForNestedPropertyChangeProperty
Identifies the ListenForNestedPropertyChange property.
Declaration
public static readonly BindableProperty ListenForNestedPropertyChangeProperty
Field Value
Xamarin.Forms.BindableProperty
|
LoadOnDemandAutoTemplateProperty
Identifies the LoadOnDemandAutoTemplate property.
Declaration
public static readonly BindableProperty LoadOnDemandAutoTemplateProperty
Field Value
Xamarin.Forms.BindableProperty
|
LoadOnDemandBufferItemsCountProperty
Identifies the LoadOnDemandBufferItemsCount property.
Declaration
public static readonly BindableProperty LoadOnDemandBufferItemsCountProperty
Field Value
Xamarin.Forms.BindableProperty
|
LoadOnDemandModeProperty
Identifies the LoadOnDemandMode property.
Declaration
public static readonly BindableProperty LoadOnDemandModeProperty
Field Value
Xamarin.Forms.BindableProperty
|
LoadOnDemandRowStyleProperty
Identifies the LoadOnDemandRowStyle property.
Declaration
public static readonly BindableProperty LoadOnDemandRowStyleProperty
Field Value
Xamarin.Forms.BindableProperty
|
LoadOnDemandRowTemplateProperty
Identifies the LoadOnDemandRowTemplate property.
Declaration
public static readonly BindableProperty LoadOnDemandRowTemplateProperty
Field Value
Xamarin.Forms.BindableProperty
|
RowBackgroundStyleProperty
Identifies the RowBackgroundStyle property.
Declaration
public static readonly BindableProperty RowBackgroundStyleProperty
Field Value
Xamarin.Forms.BindableProperty
|
RowHeightProperty
Identifies the RowHeight property.
Declaration
public static readonly BindableProperty RowHeightProperty
Field Value
Xamarin.Forms.BindableProperty
|
SelectedItemProperty
Identifies the SelectedItem property.
Declaration
public static readonly BindableProperty SelectedItemProperty
Field Value
Xamarin.Forms.BindableProperty
|
SelectedItemsProperty
Identifies the SelectedItems property.
Declaration
public static readonly BindableProperty SelectedItemsProperty
Field Value
Xamarin.Forms.BindableProperty
|
SelectionModeProperty
Identifies the SelectionMode property.
Declaration
public static readonly BindableProperty SelectionModeProperty
Field Value
Xamarin.Forms.BindableProperty
|
SelectionStyleProperty
Identifies the SelectionStyle property.
Declaration
public static readonly BindableProperty SelectionStyleProperty
Field Value
Xamarin.Forms.BindableProperty
|
SelectionUnitProperty
Identifies the SelectionUnit property.
Declaration
public static readonly BindableProperty SelectionUnitProperty
Field Value
Xamarin.Forms.BindableProperty
|
ShowColumnFootersProperty
ShowGroupFootersProperty
ShowGroupHeaderAggregatesProperty
Identifies the ShowGroupHeaderAggregates dependency property.
Declaration
public static readonly BindableProperty ShowGroupHeaderAggregatesProperty
Field Value
Xamarin.Forms.BindableProperty
|
UserEditModeProperty
Identifies the UserEditMode property.
Declaration
public static readonly BindableProperty UserEditModeProperty
Field Value
Xamarin.Forms.BindableProperty
|
UserFilterModeProperty
Identifies the UserGroupMode property.
Declaration
public static readonly BindableProperty UserFilterModeProperty
Field Value
Xamarin.Forms.BindableProperty
|
UserGroupModeProperty
Identifies the UserGroupMode dependency property.
Declaration
public static readonly BindableProperty UserGroupModeProperty
Field Value
Xamarin.Forms.BindableProperty
|
UserSortModeProperty
Identifies the UserSortMode dependency property.
Declaration
public static readonly BindableProperty UserSortModeProperty
Field Value
Xamarin.Forms.BindableProperty
|
ViewportBufferHeightProperty
Identifies the
Declaration
public static readonly BindableProperty ViewportBufferHeightProperty
Field Value
Xamarin.Forms.BindableProperty
|
Properties
AlternateRowBackgroundStyle
Gets or sets the style that defines the appearance of an alternate row.
Declaration
public DataGridBorderStyle AlternateRowBackgroundStyle { get; set; }
Property Value
DataGridBorderStyle
|
AutoGenerateColumns
Gets or sets a value indicating whether grid's columns will be auto-generated from the provided ViewModel's properties.
Declaration
public bool AutoGenerateColumns { get; set; }
Property Value
System.Boolean
|
Columns
Gets the collection of DataGridColumn objects currently displayed within the grid.
Declaration
public DataGridColumnCollection Columns { get; }
Property Value
DataGridColumnCollection
|
Commands
Gets the collection with all the custom commands registered with the CommandService. Custom commands have higher priority than the built-in (default) ones.
Declaration
public ObservableCollection<ControlCommandBase<RadDataGrid>> Commands { get; }
Property Value
System.Collections.ObjectModel.ObservableCollection<ControlCommandBase<RadDataGrid>>
|
CommandService
Gets the DataGridCommandService instance that manages the commanding behavior of this instance.
Declaration
public DataGridCommandService CommandService { get; }
Property Value
DataGridCommandService
|
Implements
DataOperationIndicationMode
Gets or sets a value that defines whether a universal indicator is used or individual indicators are used when data operations are applied.
Declaration
public DataOperationIndicationMode DataOperationIndicationMode { get; set; }
Property Value
DataOperationIndicationMode
|
EmptyContentDisplayMode
Gets or sets a value that specifies when the EmptyContentTemplate will be displayed.
Declaration
public EmptyContentDisplayMode EmptyContentDisplayMode { get; set; }
Property Value
EmptyContentDisplayMode
|
EmptyContentTemplate
Gets or sets the Xamarin.Forms.DataTemplate that defines the content of the view which is shown when there are no items.
Declaration
public DataTemplate EmptyContentTemplate { get; set; }
Property Value
Xamarin.Forms.DataTemplate
|
FilterDescriptors
Gets the collection of FilterDescriptorBase objects that defines the current filtering within this instance.
Declaration
public FilterDescriptorCollection FilterDescriptors { get; }
Property Value
FilterDescriptorCollection
|
GridLinesColor
Gets or sets the Xamarin.Forms.Color value that defines the appearance of grid's horizontal and vertical lines.
Declaration
public Color GridLinesColor { get; set; }
Property Value
Xamarin.Forms.Color
|
GridLinesThickness
Gets or sets the width of the vertical grid lines and the height of the horizontal grid lines.
Declaration
public double GridLinesThickness { get; set; }
Property Value
System.Double
|
GridLinesVisibility
Gets or sets the GridLinesVisibility value that defines which grid lines are currently visible (displayed).
Declaration
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
public GroupDescriptorCollection GroupDescriptors { get; }
Property Value
GroupDescriptorCollection
|
GroupFooterStyle
GroupFooterStyleSelector
GroupFooterTemplate
GroupHeaderStyle
Gets or sets the DataGridGroupHeaderStyle instance that defines the appearance of all the group headers within the grid.
Declaration
public DataGridGroupHeaderStyle GroupHeaderStyle { get; set; }
Property Value
DataGridGroupHeaderStyle
|
GroupHeaderStyleSelector
Gets or sets the DataGridStyleSelector instance that may be used to select different styles on a per group header basis.
Declaration
public DataGridStyleSelector GroupHeaderStyleSelector { get; set; }
Property Value
DataGridStyleSelector
|
GroupHeaderTemplate
Gets or sets the Xamarin.Forms.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
public DataTemplate GroupHeaderTemplate { get; set; }
Property Value
Xamarin.Forms.DataTemplate
|
GroupHeaderTemplateSelector
Gets or sets the Xamarin.Forms.DataTemplateSelector instance that may be used to select group header template on a per header instance basis. The "Item" parameter of the DataTemplateSelector.SelectTemplate method will be a GroupHeaderContext instance.
Declaration
public DataTemplateSelector GroupHeaderTemplateSelector { get; set; }
Property Value
Xamarin.Forms.DataTemplateSelector
|
HitTestService
Gets the HitTestService instance that provides methods for retrieving rows and cells from a given physical location.
Declaration
public HitTestService HitTestService { get; }
Property Value
HitTestService
|
IsBusy
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
public bool IsBusy { get; set; }
Property Value
System.Boolean
|
ItemsSource
Gets or sets the data provider.
Declaration
public object ItemsSource { get; set; }
Property Value
System.Object
|
ListenForNestedPropertyChange
Gets or sets a value indicating whether the DataGrid should be updated if INotifyPropertyChanged item from its source is changed.
Declaration
public bool ListenForNestedPropertyChange { get; set; }
Property Value
System.Boolean
|
LoadOnDemandAutoTemplate
Gets or sets the DataTemplate of the row that get visualized when the LoadOnDemandMode is Auto.
Declaration
public DataTemplate LoadOnDemandAutoTemplate { get; set; }
Property Value
Xamarin.Forms.DataTemplate
|
LoadOnDemandBufferItemsCount
Gets or sets the incremental loading buffer items count.
Declaration
public int LoadOnDemandBufferItemsCount { get; set; }
Property Value
System.Int32
The incremental loading buffer items count. |
LoadOnDemandMode
Gets or sets the load on demand mode.
Declaration
public LoadOnDemandMode LoadOnDemandMode { get; set; }
Property Value
LoadOnDemandMode
|
LoadOnDemandRowStyle
Gets or sets the DataGridLoadOnDemandRowStyle instance that defines the appearance of the load more data row.
Declaration
public DataGridLoadOnDemandRowStyle LoadOnDemandRowStyle { get; set; }
Property Value
DataGridLoadOnDemandRowStyle
|
LoadOnDemandRowTemplate
Gets or sets the DataTemplate of the row that get visualized when the LoadOnDemandMode is Manual.
Declaration
public DataTemplate LoadOnDemandRowTemplate { get; set; }
Property Value
Xamarin.Forms.DataTemplate
|
RowBackgroundStyle
Gets or sets the style that defines the appearance of each row.
Declaration
public DataGridBorderStyle RowBackgroundStyle { get; set; }
Property Value
DataGridBorderStyle
|
RowHeight
Gets or sets the height of the row. In order to make the row auto measure its Height set the value to System.Double.NaN.
Declaration
public double RowHeight { get; set; }
Property Value
System.Double
|
SelectedItem
Gets or sets the selected item of the DataGrid.
Declaration
public object SelectedItem { get; set; }
Property Value
System.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
public ObservableCollection<object> SelectedItems { get; }
Property Value
System.Collections.ObjectModel.ObservableCollection<System.Object>
|
SelectionMode
Gets or sets the selection mode of the DataGrid. The default value is DataGridSelectionMode.Single
.
Declaration
public DataGridSelectionMode SelectionMode { get; set; }
Property Value
DataGridSelectionMode
|
Examples
XAML
<telerikGrid:RadDataGrid x:Name="dataGrid" SelectionMode="Multiple"/>
C#
this.dataGrid.SelectionMode = DataGridSelectionMode.Multiple;
SelectionStyle
Gets or sets the DataGridBorderStyle that defines the appearance settings applied to the RadDataGrid selection.
Declaration
public DataGridBorderStyle SelectionStyle { get; set; }
Property Value
DataGridBorderStyle
|
SelectionUnit
Gets or sets the selection unit of the DataGrid. The default value is DataGridSelectionUnit.Row
Declaration
public DataGridSelectionUnit SelectionUnit { get; set; }
Property Value
DataGridSelectionUnit
|
Examples
XAML
<telerikGrid:RadDataGrid x:Name="dataGrid" SelectionUnit="Cell"/>
C#
this.dataGrid.SelectionUnit = DataGridSelectionUnit.Cell;
ShowColumnFooters
ShowGroupFooters
ShowGroupHeaderAggregates
Gets or sets a value indicating whether to show aggregates in the group headers.
Declaration
public bool ShowGroupHeaderAggregates { get; set; }
Property Value
System.Boolean
|
SortDescriptors
Gets the collection of SortDescriptorBase objects that defines the current sorting within this instance. Multiple sort descriptors define a sorting operation by multiple keys.
Declaration
public SortDescriptorCollection SortDescriptors { get; }
Property Value
SortDescriptorCollection
|
UserEditMode
Gets or sets the user edit mode of the DataGrid.
Declaration
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
public DataGridUserFilterMode UserFilterMode { get; set; }
Property Value
DataGridUserFilterMode
|
Examples
XAML
<telerikGrid:RadDataGrid x:Name="dataGrid" UserFilterMode="Disabled"/>
C#
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
public DataGridUserGroupMode UserGroupMode { get; set; }
Property Value
DataGridUserGroupMode
|
Examples
XAML
<telerikGrid:RadDataGrid x:Name="dataGrid" UserGroupMode="Disabled"/>
C#
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
public DataGridUserSortMode UserSortMode { get; set; }
Property Value
DataGridUserSortMode
|
Examples
XAML
<telerikGrid:RadDataGrid x:Name="dataGrid" UserSortMode="None"/>
C#
this.dataGrid.UserSortMode = DataGridUserSortMode.None;
ViewportBufferHeight
Gets or sets the size of the buffer of the viewport in UWP. The buffer is intended to virtually expand the size of the viewport the DataGrid's engine works with. The engine then works with a viewport that is actually larger than the visible area of the DataGrid. The engine considers this expanded viewport to be the actual viewport in which the drawing surface is positioned and in which visual elements are realized (virtualized).
Declaration
public double ViewportBufferHeight { get; set; }
Property Value
System.Double
|
Methods
CancelEdit()
Cancels the current edit operation.
Declaration
public bool CancelEdit()
Returns
System.Boolean
|
CommitEdit()
Commits the current edit operation.
Declaration
public bool CommitEdit()
Returns
System.Boolean
|
DeselectAll()
Clears the current selection state.
Declaration
public void DeselectAll()
DeselectCell(DataGridCellInfo)
Removes the selection for the grid cell defined by the specified cell info.
Declaration
public void DeselectCell(DataGridCellInfo item)
Parameters
DataGridCellInfo
item
|
DeselectItem(Object)
Removes the selection for the specified data item and removes it from the SelectedItems collection.
Declaration
public void DeselectItem(object item)
Parameters
System.Object
item
|
GetDataView()
Gets the IDataViewCollection instance that can be used to traverse and/or manipulate the data after all the Sort, Group and Filter operations are applied.
Declaration
public IDataViewCollection GetDataView()
Returns
IDataViewCollection
|
OnBindingContextChanged()
Invoked whenever the binding context of the element changes. Implement this method to add class handling for this event.
Declaration
protected override void OnBindingContextChanged()
OnPropertyChanged(String)
Declaration
protected override void OnPropertyChanged(string propertyName = null)
Parameters
System.String
propertyName
|
ScrollItemIntoView(Object)
Scrolls the RadDataGrid so that the business item falls into the visible viewport.
Declaration
public void ScrollItemIntoView(object item)
Parameters
System.Object
item
The business item from the ItemsSource. |
SelectAll()
Selects all the items as defined by the SelectionMode and SelectionUnit
Declaration
public void SelectAll()
SelectCell(DataGridCellInfo)
Selects the grid cell as defined by the specified cell info.
Declaration
public void SelectCell(DataGridCellInfo item)
Parameters
DataGridCellInfo
item
|
Remarks
In order to select a cell, the SelectionUnit value should be DataGridSelectionUnit.Cell
.
SelectItem(Object)
Selects the specified data item and adds it in the SelectedItems collection.
Declaration
public void SelectItem(object item)
Parameters
System.Object
item
|
Remarks
In order to select a Row, the SelectionUnit value should be DataGridSelectionUnit.Row
.
Events
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
public event EventHandler<DataBindingCompleteEventArgs> DataBindingComplete
Event Type
System.EventHandler<DataBindingCompleteEventArgs>
|
LoadOnDemand
Fires when load on demand is requested.
Declaration
public event EventHandler<LoadOnDemandEventArgs> LoadOnDemand
Event Type
System.EventHandler<LoadOnDemandEventArgs>
|
SelectionChanged
Occurs when the currently selected items change.
Declaration
public event EventHandler<DataGridSelectionChangedEventArgs> SelectionChanged
Event Type
System.EventHandler<DataGridSelectionChangedEventArgs>
|