DataGridView Members
A data grid view.Constructors
Name | Description |
---|---|
DataGridView() | Initializes a new instance of the DataGridView class with default settings. |
Fields
Properties
Name | Description |
---|---|
ActualFilterString | Gets the string that specifies a filter currently used in the grid. |
AdvancedColumnLayout | Allows you to use the multi-row layout for the grid. |
AllowCascadeTreeCreation | Gets or sets whether the grid performs deferred data loading on start. |
AllowCascadeUpdate | Gets or sets whether the grid performs deferred data loading while vertical scrolling. |
AllowDragDropRows | Gets or sets whether a user is allowed to drag and drop data rows within the grid. |
AllowDragDropSortedRows | Gets or sets whether a user is allowed to drag and drop data rows that are sorted or grouped. |
AllowGroupCollapse | Specifies whether end users can collapse and expand groups of rows. |
AllowInitiallySelectedRow | Gets or sets whether the first row is selected when the view is displayed on-screen for the first time. |
AllowSort | Specifies whether end users can sort data in the grid. |
AllowVirtualHorizontalScrolling | Specifies whether virtual horizontal scrolling is activated. |
AutoFilterRowHeight | Gets or sets the Auto Filter Row‘s height. |
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. |
BorderColor | Gets or sets the grid border color. |
BorderThickness | Gets or sets the grid border thickness. |
CellStyle | Gets or sets the data cell appearance settings. |
ColumnHeaderContentTemplate | Gets or sets the template that defines the visual representation of column headers. |
ColumnHeaderHeight | Gets or sets the height of column headers in the grid. |
ColumnHeaderStyle | Gets or sets the column header appearance settings. |
Columns | Provides access to the grid’s collection of columns. |
EditColumn | |
EditorShowMode | Gets or sets a gesture by which a user can invoke an in-place editor for a data cell. |
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. |
FilterExpression | Gets or sets the grid’s filter expression. |
FilterString | Gets or sets the grid’s filter expression string. |
FixedColumnSeparatorWidth | Gets or sets the thickness of the line that separates fixed and scrollable columns. |
FullSwipeMode | Specifies whether a full swipe across the row performs the first action from the grid’s StartSwipeItems or EndSwipeItems collection. |
GroupCaptionTemplate | Gets or sets the template that defines the visual representation of a group row caption. |
GroupCount | Gets the number of data row groups within a grid. |
GroupRowHeight | Gets or sets the height of group rows in the grid. |
GroupRowStyle | Gets or sets the group row appearance settings. |
GroupRowTemplate | Gets or sets the template that defines the visual representation of group rows. |
GroupsInitiallyExpanded | Gets or sets whether groups of rows should appear expanded or collapsed immediately after the grid’s data is grouped. |
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. |
IndicatorColor | Gets or sets the color of the load-more (iOS and Android) and pull-to-refresh (iOS only) indicators. |
IsColumnHeaderVisible | Specifies whether column headers are shown in the grid. |
IsEditing | |
IsGrouped | Gets whether the grid’s data is grouped. |
IsHorizontalScrollBarVisible | Gets or sets whether the horizontal scrollbar is shown in the grid. |
IsLoadMoreEnabled | Gets or sets whether the load-more functionality is enabled in the grid. |
IsPullToRefreshEnabled | Gets or sets whether the pull-to-refresh functionality is enabled in the grid. |
IsReadOnly | Gets or sets whether the grid is read-only. |
IsRefreshing | Allows you to hide the refresh or load indicator that the grid displays when executing the pull-to-refresh or load-more operation. |
IsUpdateLocked | Gets or sets whether the grid is locked for updating. |
IsVerticalScrollBarVisible | Gets or sets whether the vertical scrollbar is shown in the grid. |
ItemsSource | Gets or sets the grid’s data source. |
LoadMoreCommand | Gets or sets the command executed when a user scrolls to the bottom of the grid to load new data items. |
PullToRefreshCommand | Gets or sets the command executed when a user pulls the grid down to request content update. |
ReduceHeightToContent | Gets or sets whether the grid reduces its height to occupy the minimum space needed for its data rows. |
RestoreCollectionsMode | |
RowCount | Gets the number of data rows in a grid. |
RowDragPreviewShadowColor | Gets or sets the shadow color of the dragged row preview. |
RowDragPreviewTemplate | Gets or sets the template that defines the visual representation of the dragged row preview displayed during the drag-and-drop operation. |
RowHeight | Gets or sets the height of data rows in the grid. |
RowTapCommand | Gets or sets the command executed when a user taps a row within the grid. |
SelectedItem | Returns an object that specifies a data source record to which a data row currently selected in the grid corresponds. |
SelectedRowHandle | Gets or sets the selected row handle. |
SelectionMode | Gets or sets whether end users can select rows in the grid. |
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. |
ShowFilterIcon | Gets or sets whether to show the filter icons in the Auto Filter Row‘s cells. |
ShowGroupedColumns | Gets or sets whether the grid displays a column used to group data. |
SortMode | Specifies whether the grid allows data sorting by multiple columns or by a single column only. |
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. |
SwipeItemStyle | Gets or sets the swipe item appearance settings. |
SwipeItemTemplate | Gets or sets the template that defines the visual representation of grid’s swipe items. |
TotalSummaries | Provides access to the collection of total summary items. |
TotalSummaryHeight | Gets or sets the total summary panel height. |
TotalSummaryStyle | Gets or sets the total summary panel appearance settings. |
TotalSummaryTemplate | Gets or sets the template that defines the visual representation of total summary items. |
TotalSummaryVisibility | Specifies whether the total summary panel is displayed. |
VerticalLineThickness | Gets or sets the thickness of the grid’s vertical lines. |
VisibleColumns | Gets the collection of visible columns. |
VisibleRowCount | Gets the total number of rows displayed within a grid. |
Methods
Name | Description |
---|---|
AfterDeserializeCollection(String, XtraItemEventArgs) | |
BeforeDeserializeCollection(String, XtraItemEventArgs) | |
BeginUpdate() | Locks the grid to prevent its visual updates until the EndUpdate method is called. |
ClearCollection(String, XtraItemEventArgs) | |
ClearColumnFilter(GridColumn) | |
ClearColumnFilter(String) | |
ClearFilter() | Clears the filter applied to data in the grid. |
ClearGrouping() | Ungroups data in the grid. |
ClearSorting() | Clears the sorting applied to the grid. |
CloseEditor(Boolean) | Closes a cell in-place editor. |
CollapseAllGroups() | Collapses all groups of rows. |
CollapseGroupRow(Int32) | Collapses the specified group of rows. |
DeleteRow(Int32) | Deletes the specified data row. |
EndUpdate() | Unlocks the grid after the BeginUpdate method call and forces an immediate visual update. |
ExpandAllGroups() | Expands all groups of rows. |
ExpandGroupRow(Int32) | Expands the specified group of rows. |
FindRow(Predicate<Object>) | Returns the handle of the first row that matches the specified criteria. |
FindRowByItem(Object) | |
FindRowByValue(String, Object) | Searches for the value in the column and returns the handle of the corresponding row. |
GetCellDisplayText(Int32, GridColumn) | Gets the text displayed within the specified cell. |
GetCellDisplayText(Int32, String) | Gets the text displayed within the specified cell. |
GetCellValue(Int32, GridColumn) | Gets the value of the specified cell. |
GetCellValue(Int32, String) | Gets the value of the specified cell. |
GetChildRowCount(Int32) | Returns the number of data rows in the group. |
GetChildRowHandle(Int32, Int32) | Returns the handle of the row at the specified position within the specified group. |
GetGroupDisplayValue(Int32) | Returns a value for which the group is created and which is displayed in a group row. |
GetGroupSummaryValue(Int32, GridColumnSummary) | Returns a summary value calculated against the specified group of rows. |
GetGroupValue(Int32) | Returns the column’s data value for which the group is created. |
GetItem(Int32) | Returns an object that represents a record in the grid’s underlying data source. |
GetParentRowHandle(Int32) | Returns the group row handle that identifies the group to which the specified data row belongs. |
GetRowHandle(Int32) | Returns the handle of the row that corresponds to the specified record in the data source. |
GetRowHandleByVisibleIndex(Int32) | |
GetSourceRowIndex(Int32) | Gets the index of the data source record to which the specified row handle corresponds. |
GetVisibleIndexByRowHandle(Int32) | |
GroupBy(GridColumn) | Groups data in the grid by the specified column. |
GroupBy(String) | Groups data in the grid by the specified column. |
IsGroupCollapsed(Int32) | Indicates whether the specified group row is collapsed. |
IsGroupRow(Int32) | Checks whether the specified row is a group row. |
MergeColumnFilters(CriteriaOperator) | |
MergeColumnFilters(String) | |
MoveItem(Int32, Int32, Action) | |
OpenEditor(Int32, String) | Invokes an in-place editor for the specified cell. |
RefreshData() | Updates the grid’s data. |
RestoreLayoutFromStream(Stream) | Restores the grid’s layout from the specified stream. |
RestoreLayoutFromXml(String) | Restores the grid’s layout from the specified XML string. |
SaveLayoutToStream(Stream) | Saves the grid’s layout to the specified stream. |
SaveLayoutToXml() | Saves the gird’s layout to an XML string. |
ScrollToColumn(GridColumn) | |
ScrollToColumn(Int32) | |
ScrollToRow(Int32) | Scrolls the grid to make the specified row visible. |
SetCellValue(Int32, GridColumn, Object) | Assigns a value to the specified cell. |
SetCellValue(Int32, String, Object) | Assigns a value to the specified cell. |
SortBy(GridColumn, ColumnSortOrder, Int32) | Sorts data by values of the specified column in the specified order, and places the column at the specified position among the sorted columns. |
SortBy(GridColumn, ColumnSortOrder) | Sorts data by values of the specified column in the specified order. |
SortBy(GridColumn) | Sorts data by values of the specified column in ascending order. |
SortBy(String) | Sorts data by values of the column bound to the specified data field in the ascending order. |
Events
Name | Description |
---|---|
AutoGeneratingColumn | Occurs each time an individual column is generated automatically. |
CalculateCustomSummary | Allows you to specify a custom rule to calculate data summaries. |
CompleteRowDragDrop | Occurs after the drag-and-drop operation is completed. |
CustomCellStyle | Occurs before a data cell is painted. |
CustomizeCellDisplayText | Allows you to provide a custom display text for any data cell. |
CustomUnboundColumnData | Enables you to populate unbound columns with data, and save changes that users made in unbound columns. |
DoubleTap | Occurs when a user double taps the grid. |
DragRow | Occurs when users touch and hold a data row to drag it. |
DragRowOver | Occurs each time a row is over another row when being dragged. |
DropRow | Occurs when users drop a row. |
GroupCollapsed | Occurs after a group of rows has been collapsed. |
GroupCollapsing | Occurs before a group of rows is collapsed. |
GroupExpanded | Occurs after a group of rows has been expanded. |
GroupExpanding | Occurs before a group of rows is expanded. |
LoadMore | Occurs when a user scrolls to the bottom of the grid to load new data items. |
LongPress | Occurs when a user taps and holds anywhere within the grid. |
PullToRefresh | Occurs when a user pulls the grid down to refresh its content. |
SelectionChanged | Occurs after the selected row has been changed in the grid. |
ShowingEditor | Fires when a cell editor is about to be displayed and allows you to cancel the action. |
SwipeItemShowing | Fires when a swipe item is about to be shown when a user swipes a row from left to right or from right to left, and allows you to cancel the action. |
Tap | Occurs when a user taps the grid. |
TapConfirmed | Occurs when a single tap is confirmed (a user tapped the grid and a second tap leading to the double-tap gesture did not follow). |
ValidateCell | Occurs after a user changes a cell value in the in-place editor and attempts to select another cell. |
ValidationError | Occurs when a value in the in-place cell editor fails validation or when it cannot be saved to a data source. |
See Also