DataGridViewRow
Wisej.Web.DataGridViewRow
Namespace: Wisej.Web
Assembly: Wisej.Framework (3.1.0.0)
Represents a row in a DataGridView control.
Constructors
DataGridViewRow()
Initializes a new instance of the DataGridViewRow class.
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.
Name | Type | Description |
---|---|---|
dataGridView |
Properties
CellCount
Int32: Returns the number of cells in the cell collection without forcing the creation of the collection.
Cells
DataGridViewCellCollection: Returns the collection of cells that populate the row.
ChildRows
DataGridViewChildRowCollection: Returns the collection of child rows.
ContextMenu
ContextMenu: Returns or sets the context menu for the row. (Default: null
)
DataBoundItem
Object: Returns the data-bound object that populated the row.
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.
Displayed
Boolean: Returns a value indicating whether this row is displayed on the screen.
ErrorText
String: Returns or sets the error message text for row-level errors. (Default: ""
)
Frozen
Boolean: Returns or sets whether a row will move when a user scrolls the DataGridView control vertically. (Default: False
)
HeaderCell
DataGridViewRowHeaderCell: Returns or sets the row's header cell.
Height
Int32: Returns or sets the current height of the row.
IsChild
Boolean: Returns whether the row is a child row.
IsExpanded
Boolean: Returns or sets whether the parent row is expanded.
IsNewRow
Boolean: Returns a value indicating whether the row is the row for new records.
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.
IsRow
Boolean: Returns true when the implementation class is DataGridViewRow.
Item(column)
DataGridViewCell: Returns or sets the cell at the provided index location.
Throws:
InvalidOperationException The specified cell when setting this property already belongs to a DataGridView control, or the specified cell when setting this property already belongs to a DataGridViewRow
ArgumentException The specified column does not belong to the same DataGridView that owns the cells.
ArgumentOutOfRangeException The index of the specified column is less than 0 or is equal to or greater than the number of cells in the collection.
Item(index)
DataGridViewCell: Returns or sets the cell at the provided index location.
Throws:
ArgumentNullException The specified value when setting this property is null.
InvalidOperationException The specified cell when setting this property already belongs to a DataGridView control, or the specified cell when setting this property already belongs to a DataGridViewRow.
ArgumentOutOfRangeException index is less than 0 or index is equal to or greater than the number of cells in the collection.
Item(columnName)
DataGridViewCell: Returns or sets the cell in the column with the provided name.
Throws:
ArgumentException columnName does not match the name of any columns in the control.
ArgumentNullException The specified value when setting this property is null.
InvalidOperationException The specified cell when setting this property already belongs to a DataGridView control, or the specified cell when setting this property already belongs to a DataGridViewRow.
Level
Int32: Returns the child nesting level of this row.
MaximumHeight
Int32: Returns or sets the maximum height of the row.
Throws:
ArgumentOutOfRangeException The specified value when setting this property is less than 0 or greater than 32000.
MinimumHeight
Int32: Returns or sets the minimum height of the row.
Throws:
ArgumentOutOfRangeException The specified value when setting this property is less than 2 or greater than 32000.
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 Rows 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.
ReadOnly
Boolean: Returns or sets whether the row is read-only. (Default: False
)
Resizable
DataGridViewTriState: Returns or sets whether users can resize the row or indicating that the behavior is inherited from the AllowUserToResizeRows property.
RootRow
DataGridViewRow: Returns the parent top-level parent row.
Selected
Boolean: Returns or sets whether the row is selected.
Visible
Boolean: Returns or sets whether the row is visible. (Default: True
)
Methods
Clone()
Creates a copy of this row.
Returns: Object. The cloned DataGridViewRow.
Collapse()
Collapse the row and hides all the child rows.
CollapseAll()
Collapse the row and all the child rows.
ContainsRow(row)
Checks whether the specified row is a child of this row, or a child of a child of this row.
Parameter | Type | Description |
---|---|---|
row | The 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.
Expand()
Expands the row and shows all the child rows.
ExpandAll()
Expands the row and all the child rows, showing all the child rows at all levels.
ResetHeight()
Resets the row height.
SetValues(values)
Sets the values of the row's cells.
Parameter | Type | Description |
---|---|---|
values |
Returns: Boolean. True if at least one of the values has been set; otherwise, false.
Throws:
ArgumentNullException values is null.
InvalidOperationException This method is called when the associated DataGridView is operating in virtual mode.
Update()
Updates the cell on the client.
Inherited By
Name | Description |
---|---|
Represents a summary row in a DataGridView control. |
Last updated