Skip to main content
Version: 4.1

DataGridViewRow

Namespace: Wisej.Web

Assembly: Wisej.Framework (4.1.0.0)

Represents a row in a DataGridView control.

public class DataGridViewRow : DataGridViewBand

Constructors

Instance member DataGridViewRow()

Initializes a new instance of the DataGridViewRow class.

Instance member DataGridViewRow(dataGridView)

Initializes a new instance of the DataGridViewRow class bound to a DataGridView. This constructor is used to create the RowTemplate object at design time.

NameTypeDescription
dataGridViewDataGridView

Properties

Instance member CellCount

Int32: Returns the number of cells in the cell collection without forcing the creation of the collection.

Instance member Cells

DataGridViewCellCollection: Returns the collection of cells that populate the row.

Instance member ChildRows

DataGridViewChildRowCollection: Returns the collection of child rows.

Instance member ContextMenu

ContextMenu: Returns or sets the context menu for the row. (Default: null)

Instance member DataBoundItem

Object: Returns the data-bound object that populated the row.

Instance member DefaultCellStyle

DataGridViewCellStyle: Returns or sets the default styles for the row, which are used to render cells in the row unless the styles are overridden.

Instance member DefaultMinimumSize

Int32: Returns the default minimum height saving an entry in the property store.

Instance member DefaultSize

Int32: Returns the default row height.

Instance member Displayed

Boolean: Returns a value indicating whether this row is displayed on the screen.

Instance member ErrorText

String: Returns or sets the error message text for row-level errors. (Default: "")

Instance member Frozen

Boolean: Returns or sets whether a row will move when a user scrolls the DataGridView control vertically. (Default: False)

Instance member HeaderCell

DataGridViewRowHeaderCell: Returns or sets the row's header cell.

Instance member Height

Int32: Returns or sets the current height of the row.

Instance member IsChild

Boolean: Returns whether the row is a child row.

Instance member IsExpanded

Boolean: Returns or sets whether the parent row is expanded.

Instance member IsNewRow

Boolean: Returns a value indicating whether the row is the row for new records.

Instance member IsParent

Boolean: Returns or sets whether the row is a parent row and can be expanded.

Setting this property to true when the row doesn't have any children, will cause the row to expand anyway and request the child rows from the server.

Instance member IsRow

Boolean: Returns true when the implementation class is DataGridViewRow.

Instance member Item(column)

DataGridViewCell: Returns or sets the cell at the provided index location.

Throws:

Instance member Item(index)

DataGridViewCell: Returns or sets the cell at the provided index location.

Throws:

Instance member Item(columnName)

DataGridViewCell: Returns or sets the cell in the column with the provided name.

Throws:

Instance member Level

Int32: Returns the child nesting level of this row.

Instance member MaximumHeight

Int32: Returns or sets the maximum height of the row.

Throws:

Instance member MinimumHeight

Int32: Returns or sets the minimum height of the row.

Throws:

Instance member ParentRow

DataGridViewRow: Returns or sets the parent row.

When a row has a parent row, it is displayed as child row in a tree-like structure. To enumerate all the child rows use the ChildRows property.

When changing the parent row, Wisej tries to enforce the correct sequence of rows in the structure like this:

  • The preceding rows with null parent will also become child rows using the same parent.
  • If the parent being assigned is not a direct ancestor, it will throw an exception.
  • When setting the parent to null, all the following rows that are not descendants will also lose their parent.
  • When adding or inserting a row, the new row will receive the same parent as the row at the location it is being inserted at. Throws:
  • ArgumentException When the parent is not a valid ancestor and it would cause break in the tree sequence.

Instance member ReadOnly

Boolean: Returns or sets whether the row is read-only. (Default: False)

Instance member Resizable

DataGridViewTriState: Returns or sets whether users can resize the row or indicating that the behavior is inherited from the AllowUserToResizeRows property.

Instance member RootRow

DataGridViewRow: Returns the parent top-level parent row.

Instance member Selected

Boolean: Returns or sets whether the row is selected.

Instance member Visible

Boolean: Returns or sets whether the row is visible. (Default: True)

Methods

Instance member Clone()

Creates a copy of this row.

Returns: Object. The cloned DataGridViewRow.

Instance member Collapse()

Collapse the row and hides all the child rows.

Instance member CollapseAll()

Collapse the row and all the child rows.

Instance member ContainsRow(row)

Checks whether the specified row is a child of this row, or a child of a child of this row.

ParameterTypeDescription
rowDataGridViewRowThe row to find in the child row collections.

Returns: Boolean. True if the specified row is a child of this row, or a child of a child of this row.

Instance member Expand()

Expands the row and shows all the child rows.

Instance member ExpandAll()

Expands the row and all the child rows, showing all the child rows at all levels.

Protected member GetErrorText()

Returns the error text for the row at the specified index.

Returns: String. A string that describes the error of the row at the specified index.

Instance member ResetHeight()

Resets the row height.

Instance member SetValues(values)

Sets the values of the row's cells.

ParameterTypeDescription
valuesObject[]One or more objects that represent the cell values in the row. or An Array of Object values.

Returns: Boolean. True if at least one of the values has been set; otherwise, false.

Throws:

Instance member Update()

Updates the cell on the client.

Inherited By

NameDescription
DataGridViewSummaryRowRepresents a summary row in a DataGridView control.

Implements

NameDescription
IUserDataProvides access to the UserData and Tag properties associated to the component implementing this interface.