DataGridViewColumnHeaderCell
Namespace: Wisej.Web
Assembly: Wisej.Framework (4.1.0.0)
Represents a column header in a DataGridView control.
- C#
- VB.NET
public class DataGridViewColumnHeaderCell : DataGridViewHeaderCell
Public Class DataGridViewColumnHeaderCell
Inherits DataGridViewHeaderCell
Constructors
DataGridViewColumnHeaderCell()
Initializes a new instance of DataGridViewColumnHeaderCell.
Properties
ErrorText
String: This property is not relevant for this class.
SortGlyphDirection
SortOrder: Returns or sets a value indicating which sort glyph is displayed.
Throws:
- InvalidOperationException When setting this property, the value of either the OwningColumn property or the DataGridView property of the cell is null. or When changing the value of this property, the specified value is not None and the value of the SortMode property of the owning column is NotSortable.
Methods
GetClipboardContent(rowIndex, firstCell, lastCell, inFirstRow, inLastRow, format)
Returns the formatted value of the cell to copy to the Clipboard.
| Parameter | Type | Description |
|---|---|---|
| rowIndex | Int32 | The zero-based index of the row containing the cell. |
| firstCell | Boolean | true to indicate that the cell is in the first column of the region defined by the selected cells; otherwise, false. |
| lastCell | Boolean | true to indicate that the cell is the last column of the region defined by the selected cells; otherwise, false. |
| inFirstRow | Boolean | true to indicate that the cell is in the first row of the region defined by the selected cells; otherwise, false. |
| inLastRow | Boolean | true to indicate that the cell is in the last row of the region defined by the selected cells; otherwise, false. |
| format | String | The current format string of the cell. |
Returns: Object. An Object that represents the value of the cell to copy to the Clipboard.
Throws:
- ArgumentOutOfRangeException rowIndex is less than 0 or greater than or equal to the number of rows in the control.
- InvalidOperationException The value of the cell's DataGridView property is null.-or-ColumnIndex is less than 0, indicating that the cell is a row header cell.
- Exception Formatting failed and either there is no handler for the DataError event of the DataGridView control or the handler set the ThrowException property to true. The exception object can typically be cast to type FormatException.
GetErrorText()
This method is not relevant for this class.
Returns: String.
GetInheritedStyle(includeVisualProperties)
Returns the style applied to the column header cell.
| Parameter | Type | Description |
|---|---|---|
| includeVisualProperties | Boolean | true to include inherited visual properties; otherwise, false to include only formatting properties. |
Returns: DataGridViewCellStyle. A DataGridViewCellStyle that includes the style of the column header cell and the style inherited from the DataGridView.
Throws:
- InvalidOperationException The cell has no associated DataGridView.
GetValue()
Returns the value of the cell.
Returns: Object. The value contained in the DataGridViewColumnHeaderCell.
Render(data, styles, errors, tooltips)
Renders the cell's value and style.
| Parameter | Type | Description |
|---|---|---|
| data | Object | The data collection to render the cell's value into. |
| styles | Object | The styles collection to render the cell's styles into. |
| errors | Object | The errors collection to render the cell's error text into. |
| tooltips | Object | The tooltips collection to render the cell's tooltip text into. |
SetValue(value)
Sets the value of the cell.
| Parameter | Type | Description |
|---|---|---|
| value | Object | The cell value to set. |
Returns: Boolean. true if the value has been set; otherwise, false.
Implements
| Name | Description |
|---|---|
| IUserData | Provides access to the UserData and Tag properties associated to the component implementing this interface. |
| ICommandSource | Defines an object that can invoke a Command. |