Skip to main content
A newer version of this page is available. .

DataGridView Methods

A data grid view.
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.
Equals(Object, Object) static Determines whether the specified object instances are considered equal. Inherited from Object.
Equals(Object) Determines whether the specified object is equal to the current object. Inherited from Object.
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.
GetHashCode() Serves as the default hash function. Inherited from Object.
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.
GetType() Gets the Type of the current instance. Inherited from Object.
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.
MemberwiseClone() protected Creates a shallow copy of the current Object. Inherited from Object.
MergeColumnFilters(CriteriaOperator)
MergeColumnFilters(String)
MoveItem(Int32, Int32, Action)
OpenEditor(Int32, String) Invokes an in-place editor for the specified cell.
ReferenceEquals(Object, Object) static Determines whether the specified Object instances are the same instance. Inherited from Object.
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.
ToString() Returns a string that represents the current object. Inherited from Object.
See Also