Skip to main content

DataGridView Properties

A data grid view.
Name Description
ActualAppearance Gets the common appearance settings that are applied to the current DataGridView.
ActualFilterString Gets the string that specifies a filter used in the grid. This is a bindable property.
AdvancedColumnLayout Gets or sets whether the grid displays its rows in multiple lines. This is a bindable property.
AllowCascadeTreeCreation Gets or sets whether the grid performs deferred data loading on start. This is a bindable property.
AllowCascadeUpdate Gets or sets whether the grid performs deferred data loading while it is scrolled vertically. This is a bindable property.
AllowDragDropRows Gets or sets whether a user is allowed to drag and drop data rows within the grid. This is a bindable property.
AllowDragDropSortedRows Gets or sets whether a user is allowed to drag and drop data rows that are sorted or grouped. This is a bindable property.
AllowGroupCollapse Gets or sets whether users can collapse and expand groups of rows. This is a bindable property.
AllowInitiallySelectedRow Gets or sets whether the first row is selected when the view is displayed on-screen for the first time. This is a bindable property.
AllowLiveDataShaping Gets or sets whether the DataGridView refreshes itself if the data source notifies the control of value changes. The control re-shapes its data: changes the sort order, applies filter conditions, calculates summaries, and carries out other necessary updates. This functionality is available for item source objects that implement the INotifyPropertyChanged interface. This is a bindable property.
AllowSort Gets or sets whether users can sort data in the grid. This is a bindable property.
AllowVirtualHorizontalScrolling Gets or sets whether virtual horizontal scrolling is activated. This is a bindable property.
AnchorX Gets or sets the X component of the center point for any transform operation, relative to the bounds of the element. This is a bindable property. Inherited from VisualElement.
AnchorY Gets or sets the Y component of the center point for any transform operation, relative to the bounds of the element. This is a bindable property. Inherited from VisualElement.
AutoExpandAllGroups Gets or sets whether users can expand all DataGridView groups. This is a bindable property.
AutoFilterRowHeight Gets or sets the Auto Filter Row’s height. This is a bindable property.
AutoGenerateColumnsMode Gets or sets whether columns should be automatically created for fields of the underlying data source, depending on whether the grid contains any columns. This is a bindable property.
AutomationId Gets or sets a value that allows the automation framework to find and interact with this element. Inherited from Element.
Background Gets or sets the Brush which will be used to fill the background of an element. This is a bindable property. Inherited from VisualElement.
BackgroundColor Gets or sets the Color which will fill the background of an element. This is a bindable property. Inherited from VisualElement.
Batched Gets a value that indicates there are batched changes done for this element. Inherited from VisualElement.
Behaviors Gets the list of Behavior objects associated to this element. This is a read-only bindable property. Inherited from VisualElement.
BindingContext

Gets or sets an object that contains the properties that will be targeted by the bound properties that belong to this BindableObject. This is a bindable property.

Inherited from BindableObject.
BorderColor Gets or sets the grid border color. This is a bindable property.
BorderThickness Gets or sets the grid border thickness. This is a bindable property.
Bounds Gets the bounds of the element in device-independent units. Inherited from VisualElement.
CellAppearance Gets or sets the appearance settings that are applied to the current DataGridView‘s cells. This is a bindable property.
class Gets or sets the style classes for the element. Inherited from NavigableElement.
ClassId Gets or sets a value used to identify a collection of semantically similar elements. Inherited from Element.
Clip Specifies the clipping region for an element. This is a bindable property. Inherited from VisualElement.
ColumnHeaderAppearance Gets or sets the appearance settings that are applied to the current DataGridView‘s column headers. This is a bindable property.
ColumnHeaderContentTemplate Gets or sets the template that defines the visual representation of column headers. This is a bindable property.
ColumnHeaderHeight Gets or sets the height of column headers in the grid. This is a bindable property.
Columns Provides access to the grid’s collection of columns.
Commands Returns the collection of DataGridView commands.
DesiredSize Gets the size that this element computed during the measure pass of the layout process. Inherited from VisualElement.
DetailEditFormTemplate Gets or sets the template used to build the edit form for a DataGridView row.
DetailFormTemplate Gets or sets the template used to build the view form for a DataGridView row.
DetailNewItemFormTemplate Gets or sets the template used to build the new item form for a DataGridView row.
DisableLayout Gets a value that indicates that layout for this element is disabled. Inherited from VisualElement.
Dispatcher

Gets the dispatcher that was available when this bindable object was created, otherwise tries to find the nearest available dispatcher (probably the window’s/app’s).

Inherited from BindableObject.
EditColumn Gets the GridColumn that includes the cell that is being edited. This is a bindable property.
EditItem
Editor Gets the editor that is displayed when the cell is being edited. This is a bindable property.
EditorShowMode Gets or sets a gesture by which a user can invoke an in-place editor for a data cell. This is a bindable property.
EditRowHandle Gets the row index that includes the cell that is being edited. This is a bindable property.
EffectControlProvider For internal use by .NET MAUI. Inherited from Element.
Effects Gets or sets the styles and properties that will be applied to the element during runtime. Inherited from Element.
EnableImmediatePosting Gets or sets whether to post values to a data source immediately after changing a cell value. This is a dependency property.
EndSwipeItems Provides access to objects that contain information on action buttons shown on the right side of a data row when a user swipes the row from right to left.
ExportCellAppearance Gets or sets the appearance object applied to cells in the exported document. This is a bindable property.
ExportColumnHeaderAppearance Gets or sets the appearance object applied to column header items in the exported document. This is a bindable property.
ExportColumnHeaderMode Gets or sets the location of DataGridView headers in an exported document. This is a bindable property.
ExportGroupRowAppearance Gets or sets the appearance object applied to group row items (including Group Summary) in the exported document. This is a bindable property.
ExportGroupSummary Gets or sets whether to print the group summary panel. This is a bindable property.
ExportGroupSummaryAppearance Gets or sets the appearance object applied to the group summary items in the exported document. This is a bindable property.
ExportTotalSummary Gets or sets whether to export the summary panel. This is a bindable property.
ExportTotalSummaryAppearance Gets or sets the appearance object applied to the total summary items when they are exported. This is a bindable property.
ExtentHeight Gets the extent height.
ExtentWidth Gets the extent width.
FilterExpression Gets or sets the grid’s filter expression. This is a bindable property.
FilterIconColor Gets or sets a color of the filter icon. This is a bindable property.
FilteringContext Returns the data context that is used to bind filter items to the Data Grid View.
FilteringUITemplate Gets or sets the template that is used to build the filter form for Data Grid rows.
FilterString Gets or sets the grid’s filter expression string. This is a bindable property.
FixedColumnSeparatorThickness Gets or sets the thickness of the line that separates fixed and scrollable columns. This is a bindable property.
FlowDirection Gets or sets the layout flow direction. This is a bindable property. Inherited from VisualElement.
Frame Gets or sets the frame this element resides in on screen. Inherited from VisualElement.
FullSwipeMode Gets or sets whether a full swipe across the row performs the first action from the grid’s StartSwipeItems or EndSwipeItems collection. This is a bindable property.
GestureRecognizers The collection of gesture recognizers associated with this view. Inherited from View.
GroupCaptionTemplate Gets or sets the template that defines the visual representation of a group row caption. This is a bindable property.
GroupCount Returns the number of data row groups within a grid.
GroupRowAppearance Gets or sets the appearance settings that are applied to the current DataGridView‘s group row. This is a bindable property.
GroupRowHeight Gets or sets the height of group rows in the grid. This is a bindable property.
GroupRowTemplate Gets or sets the template that defines the visual representation of group rows. This is a bindable property.
GroupSummaries Provides access to the collection of group summary items.
GroupSummaryTemplate Gets or sets the template that defines the visual representation of summary items displayed within group rows. This is a bindable property.
Handler Gets or sets the IViewHandler associated to this element. Inherited from VisualElement.
Height Gets the current rendered height of this element. This is a read-only bindable property. Inherited from VisualElement.
HeightRequest Gets or sets the desired height override of this element. This is a bindable property. Inherited from VisualElement.
HorizontalOptions Gets or sets the LayoutOptions that define how the element gets laid out in a layout cycle. This is a bindable property. Inherited from View.
Id Gets a value that can be used to uniquely identify an element throughout the run of your application. Inherited from Element.
IndicatorColor Gets or sets the color of the load-more (iOS and Android) and pull-to-refresh (iOS only) indicators. This is a bindable property.
InputTransparent Gets or sets a value indicating whether this element responds to hit testing during user interaction. This is a bindable property. Inherited from VisualElement.
IsColumnHeaderVisible Gets or sets whether column headers are shown in the grid. This is a bindable property.
IsEditing Gets whether the focused cell is currently being edited. This is a bindable property.
IsEnabled Gets or sets a value indicating whether this element is enabled in the user interface. This is a bindable property. Inherited from VisualElement.
IsFocused Gets a value indicating whether this element is focused currently. This is a bindable property. Inherited from VisualElement.
IsGrouped Returns whether the grid’s data is grouped.
IsHorizontalScrollBarVisible Gets or sets whether the horizontal scrollbar is shown in the grid. This is a bindable property.
IsInitialized Gets whether the DataGridView instance is initialized.
IsLoadMoreEnabled Gets or sets whether the load-more functionality is enabled in the grid. This is a bindable property.
IsPlatformEnabled Gets or sets a value that indicates whether this elements’s platform equivalent element is enabled. Inherited from VisualElement.
IsPullToRefreshEnabled Gets or sets whether the pull-to-refresh functionality is enabled in the grid. This is a bindable property.
IsReadOnly Gets or sets whether the grid is read-only. This is a bindable property.
IsRefreshing Allows you to hide the refresh or load indicator that the grid displays when executing the pull-to-refresh or load-more operation.
IsVerticalScrollBarVisible Gets or sets whether the vertical scrollbar is shown in the grid. This is a bindable property.
IsVisible Gets or sets a value that determines whether this element will be visible on screen and take up space in layouts. This is a bindable property. Inherited from VisualElement.
ItemsSource Gets or sets the grid’s data source. This is a bindable property.
LoadMoreCommand Gets or sets the command executed when a user scrolls to the bottom of the grid to load new data items. This is a bindable property.
LogicalChildren For internal use by the Microsoft.Maui.Controls platform. Inherited from Element.
Margin Gets or set the margin for the view. Inherited from View.
MinimumHeightRequest Gets or sets the minimum height the element will request during layout. This is a bindable property. Inherited from VisualElement.
MinimumWidthRequest Gets or sets the minimum width the element will request during layout. This is a bindable property. Inherited from VisualElement.
Navigation Gets the object responsible for handling stack-based navigation. Inherited from NavigableElement.
NavigationProxy Gets the cast of Navigation to a NavigationProxy. Inherited from NavigableElement.
Opacity Gets or sets the opacity value applied to the element when it is rendered. The range of this value is 0 to 1; values outside this range will be set to the nearest valid value. This is a bindable property. Inherited from VisualElement.
Parent Gets or sets the parent Element of this element. Inherited from Element.
PullToRefreshCommand Gets or sets the command executed when a user pulls the grid down to request content update. This is a bindable property.
RealParent For internal use by .NET MAUI. Inherited from Element.
ReduceHeightToContent Gets or sets whether the grid reduces its height to occupy the minimum space needed for its data rows. This is a bindable property.
Resources Gets or sets the local resource dictionary. Inherited from VisualElement.
Rotation Gets or sets the rotation (in degrees) about the Z-axis (affine rotation) when the element is rendered. This is a bindable property. Inherited from VisualElement.
RotationX Gets or sets the rotation (in degrees) about the X-axis (perspective rotation) when the element is rendered. This is a bindable property. Inherited from VisualElement.
RotationY Gets or sets the rotation (in degrees) about the Y-axis (perspective rotation) when the element is rendered. This is a bindable property. Inherited from VisualElement.
RowDoubleTapCommand Gets or sets a command executed when a user taps a data grid item twice. This is a bindable property.
RowDragPreviewShadowColor Gets or sets the shadow color of the dragged row preview. This is a bindable property.
RowDragPreviewTemplate Gets or sets the template that defines the visual representation of the dragged row preview displayed during the drag-and-drop operation. This is a bindable property.
RowHeight Gets or sets the height of data rows in the grid. This is a bindable property.
RowLongPressCommand Gets or sets a command executed when a user taps and holds an item within the grid control.
RowTapCommand Gets or sets the command executed when a user taps a row within the grid. This is a bindable property.
RowTapConfirmedCommand Gets or sets the command that confirms a single-tap action (which thus times out the second tap for a double-tap gesture). This is a bindable property.
Scale Gets or sets the scale factor applied to the element. This is a bindable property. Inherited from VisualElement.
ScaleX Gets or sets a scale value to apply to the X direction. This is a bindable property. Inherited from VisualElement.
ScaleY Gets or sets a scale value to apply to the Y direction. This is a bindable property. Inherited from VisualElement.
SelectedItem Returns an object that specifies the data source record to which the currently selected data row in the grid corresponds. This is a bindable property.
SelectedRowHandle Gets or sets the selected row handle. This is a bindable property.
SelectionMode Gets or sets whether end users can select rows in the grid. This is a bindable property.
ShowAutoFilterRow Gets or sets whether to display the Auto Filter Row, which allows a user to enter a value in a column to automatically filter values in this column according to a filter condition. This is a bindable property.
ShowFilterIcon Gets or sets whether to show the filter icons in the Auto Filter Row’s cells. This is a bindable property.
ShowGroupedColumns Gets or sets whether the grid displays a column used to group data. This is a bindable property.
SortMode Gets or sets whether the grid allows data sorting by multiple columns or by a single column only. This is a bindable property.
StartSwipeItems Provides access to objects that contain information on action buttons shown on the left side of a data row when a user swipes the row from left to right.
Style Gets or sets the unique Style for this element. Inherited from NavigableElement.
StyleClass Gets or sets the style classes for the element. Inherited from NavigableElement.
StyleId Gets or sets a user defined value to uniquely identify the element. Inherited from Element.
SwipeItemAppearance Gets or sets the appearance settings that are applied to the current DataGridView‘s swipe items. This is a bindable property.
SwipeItemTemplate Gets or sets the template that defines the visual representation of grid’s swipe items. This is a bindable property.
TotalSummaries Provides access to the collection of total summary items.
TotalSummaryAppearance Gets or sets the appearance settings that are applied to the current DataGridView‘s total summary items. This is a bindable property.
TotalSummaryHeight Gets or sets the total summary panel height. This is a bindable property.
TotalSummaryTemplate Gets or sets the template that defines the visual representation of total summary items. This is a bindable property.
TotalSummaryVisibility Gets or sets whether the total summary panel is displayed. This is a bindable property.
TranslationX Gets or sets the X translation delta of the element. This is a bindable property. Inherited from VisualElement.
TranslationY Gets or sets the Y translation delta of the element. This is a bindable property. Inherited from VisualElement.
Triggers Gets the list of TriggerBase objects associated to this element. This is a read-only bindable property. Inherited from VisualElement.
VerticalLineThickness Gets or sets the thickness of the grid’s vertical lines. This is a bindable property.
VerticalOptions Gets or sets the LayoutOptions that define how the element gets laid out in a layout cycle. This is a bindable property. Inherited from View.
VisibleColumns Gets the collection of visible columns.
VisibleRowCount Gets the total number of rows displayed within a grid.
Visual Gets or sets a IVisual implementation that overrides the visual appearance of an element. This is a bindable property. Inherited from VisualElement.
Width Gets the current width of this element. This is a read-only bindable property. Inherited from VisualElement.
WidthRequest Gets or sets the desired width override of this element. This is a bindable property. Inherited from VisualElement.
X Gets the current X position of this element. This is a read-only bindable property. Inherited from VisualElement.
Y Gets the current Y position of this element. This is a read-only bindable property. Inherited from VisualElement.
See Also