DataGridView
Wisej.Web.DataGridView
Last updated
Wisej.Web.DataGridView
Last updated
Namespace: Wisej.Web
Assembly: Wisej.Framework (2.2.0.0)
Represents a data grid control.
Initializes a new instance of the DataGridView class.
Boolean: Returns or sets whether the DataGridView can automatically sort rows in the DataSource when the data is in an IList object.
When the DataGridView is data-bound, sorting is delegated to the DataSource when it supports sorting (see SupportsSorting). Otherwise, if the data is in an IList object and AllowSortingDataSource is true, Wisej swaps the rows in the data source. This behavior is different than WinForms, where sorting of the data source is always delegated to the data source and is otherwise ignored. Setting AllowSortingDataSource to false reverts to the same behavior as in WinForms.
Boolean: Returns or sets whether the user can add new rows.
Boolean: Returns or sets whether the user is allowed to delete rows from the DataGridView.
Boolean: Returns or sets whether manual column repositioning is enabled.
Boolean: Returns or sets whether users can resize columns.
Boolean: Returns or sets whether users can resize rows.
Boolean: Returns or sets whether columns are created automatically when the DataSource or DataMember properties are set. This property is ignored in design mode - auto column generation is always on.
Boolean: Returns or sets a value that indicates whether the control resizes based on its contents.
DataGridViewAutoSizeColumnsMode: Returns or sets a value indicating how column widths are determined.
DataGridViewAutoSizeRowsMode: Returns or sets a value indicating how row heights are determined.
Throws:
InvalidOperationException The specified value when setting this property is AllHeaders or DisplayedHeaders and row headers are hidden.
BorderStyle: Returns or sets the border style for the DataGridView.
DataGridViewCellBorderStyle: Returns or sets the cell border style for the DataGridView control.
DataGridViewClipboardCopyMode: Returns or sets a value that indicates whether users can copy cell text values to the Clipboard and whether row and column header text is included.
DataGridViewCellBorderStyle: Returns or sets the border style for the column headers in the DataGridView control.
DataGridViewCellStyle: Returns or sets the default column header style.
Int32: Returns or sets the height, in pixels, of the column headers row.
Throws:
ArgumentOutOfRangeException The specified value when setting this property is less than the minimum height of 4 pixels or is greater than the maximum height of 32768 pixels.
DataGridViewColumnHeadersHeightSizeMode: Returns or sets whether the height of the column headers is adjustable and whether it can be adjusted by the user or is automatically adjusted to fit the contents of the headers.
Boolean: Returns or sets whether the column header row is displayed.
Throws:
InvalidOperationException The specified value when setting this property is false and one or more columns have an InheritedAutoSizeMode property value of ColumnHeader.
DataGridViewColumnCollection: Returns a collection that contains all the columns in the control.
DataGridViewCell: Returns or sets the currently active cell.
Throws:
InvalidOperationException The value of this property cannot be set because changes to the current cell cannot be committed or canceled. Or the specified cell when setting this property is in a hidden row or column. Re-entrant calling is only allowed when the DataGridView is bound to a DataSource. Re-entrant calling results from a change to the underlying data.
ArgumentException The specified cell when setting this property is not in the DataGridView.
Point: Returns the row and column indexes of the currently active cell.
DataGridViewRow: Returns the row containing the current cell.
String: Returns or sets the name of the list or table in the data source for which the DataGridView is displaying data.
Throws:
Exception An error occurred in the data source and either there is no handler for the DataError event or the handler has set the ThrowException property to true. The exception object can typically be cast to type FormatException.
Object: Returns or sets the data source that the DataGridView is displaying data for.
Throws:
Exception An error occurred in the data source and either there is no handler for the DataError event or the handler has set the ThrowException property to true. The exception object can typically be cast to type FormatException.
DataGridViewCellStyle: Returns or sets the default cell style to be applied to the cells in the DataGridView if no other cell style properties are set.
Int32: Returns or sets the default row height.
DataGridViewEditMode: Returns or sets a value indicating how to begin editing a cell.
Throws:
Exception The specified value when setting this property would cause the control to enter edit mode, but initialization of the editing cell value failed and either there is no handler for the DataError event or the handler has set the ThrowException property to true. The exception object can typically be cast to type FormatException.
DataGridViewCell: Returns the first cell currently displayed in the DataGridView in the upper left corner.
Int32: Returns the index of the column that is the first non-frozen column displayed on the DataGridView.
Throws:
ArgumentOutOfRangeException The specified value when setting this property is less than 0 or greater than the number of columns in the control minus 1.
InvalidOperationException The specified value when setting this property indicates a column with a Visible property value of false. Or the specified value when setting this property indicates a column with a Frozen property value of true.
Int32: Returns the index of the row that is the first row displayed on the DataGridView.
Throws:
ArgumentOutOfRangeException The specified value when setting this property is less than 0 or greater than the number of rows in the control minus 1.
InvalidOperationException The specified value when setting this property indicates a row with a Visible property value of false. Or the specified value when setting this property indicates a column with a Frozen property value of true.
Int32: Returns the number of pixels by which the control is scrolled horizontally.
Int32: Returns or sets the distance in pixels to indent each child row node level.
Throws:
ArgumentOutOfRangeException The assigned value is less than 0 (see Remarks); or the assigned value is greater than 500.
Boolean: Returns a value indicating whether the current cell has uncommitted changes.
Boolean: Returns a value indicating whether the currently active cell is being edited.
Boolean: Returns a value indicating whether the current row has uncommitted changes.
DataGridViewCell: Returns or set the cell located in the specified column and at the specified row.
Throws:
ArgumentOutOfRangeException columnIndex is less than 0 or greater than the number of columns in the control minus 1; or rowIndex is less than 0 or greater than the number of rows in the control minus 1.
DataGridViewCell: Returns or set the cell located in the specified column and at the specified row.
DataGridViewCell: Returns or set the cell located in the specified column and at the specified row.
DataGridViewCell: Returns or set the cell located in the specified location.
Boolean: Returns or sets whether the rows are always of the same height.
Boolean: Returns or sets whether the column and row resizing should be live: updated as the user resizes the row or the column.
Boolean: Returns or sets whether the user is allowed to select more than one cell, row, or column of the DataGridView at a time.
Int32: Returns the index of the row for new records.
String: EXPERIMENTAL: Returns or sets an HTML string that is displayed when the DataGridView doesn't contain any row.
Boolean: Returns or sets whether the user can edit the cells of the DataGridView control.
Throws:
InvalidOperationException The specified value when setting this property is true, the current cell is in edit mode, and the current cell contains changes that cannot be committed.
Exception The specified value when setting this property would cause the control to enter edit mode, but initialization of the editing cell value failed and either there is no handler for the DataError event or the handler has set the ThrowException property to true. The exception object can typically be cast to type FormatException.
Boolean: Returns or sets whether the row under the pointer gets selected on a right click.
When the right click lands outside of a selected area the selection is not changed regardless of the value of RightClickSelection.
DataGridViewCellStyle: Returns or sets the default style applied to the row header cells.
Int32: Returns or sets the minimum width, in pixels, of the column that contains the row headers.
Throws:
ArgumentOutOfRangeException The value is less than the minimum width of 2 pixels or is greater than the maximum width of 2000 pixels.
Boolean: Returns or sets whether the column that contains row headers is displayed.
Throws:
InvalidOperationException The specified value when setting this property is false and the AutoSizeRowsMode property is set to AllHeaders or DisplayedHeaders.
Int32: Returns or sets the width, in pixels, of the column that contains the row headers.
Throws:
ArgumentOutOfRangeException The value is less than the minimum width of 2 pixels or is greater than the maximum width of 2000 pixels.
DataGridViewRowHeadersWidthSizeMode: Returns or sets whether the width of the row headers is adjustable and whether it can be adjusted by the user or is automatically adjusted to fit the contents of the headers.
DataGridViewRowCollection: Returns a collection that contains all the rows in the DataGridView control.
DataGridViewRow: Returns or sets the row that represents the template for all the rows in the control.
Throws:
InvalidOperationException The specified row when setting this property has its DataGridView property set.
ScrollBars: Returns or sets the type of scroll bars to display for the DataGridView control.
DataGridViewSelectedCellCollection: Returns the collection of selected cells.
DataGridViewSelectedColumnCollection: Returns the collection of selected columns.
DataGridViewSelectedRowCollection: Returns the collection of selected rows.
Int32: milliseconds to wait before sending selection events to the server.
Use this property to avoid flooding the server with selection change events when users quickly select rows in a data-bound DataGridView that triggers other data-bounds controls to get updated. Throws:
ArgumentOutOfRangeException When the value is less than 0 or greater than 10000 (10 seconds).
DataGridViewSelectionMode: Returns or sets a value indicating how the cells of the DataGridView can be selected.
Boolean: Returns or sets whether cells will display an error glyphs for each cell that contains a data entry error.
Boolean: Returns or sets whether or not ToolTips will show when the mouse pointer pauses on a cell.
Boolean: Returns or sets whether the column visibility menu button is visible.
Boolean: Returns or sets a value indicating whether the DataGridView widget highlights the currently focused cell.
Boolean: Returns or sets whether row headers will display an error glyphs for each row that contains a data entry error.
DataGridViewColumn: Returns the column by which the DataGridView contents are currently sorted.
SortOrder: Returns a value indicating whether the items in the DataGridView control are sorted in ascending or descending order, or are not sorted.
DataGridViewSortSelectionMode: Returns or sets a value indicating how the DataGridView updates the selection of rows and cells when it's sorted.
The selection is always cleared when sorting a data-bound DataGridView or when the grid contains hierarchical rows.
Boolean: Returns or sets whether the TAB key moves the focus to the next control in the tab order rather than moving focus to the next cell.
ComponentToolCollection: Returns the instance of ComponentToolCollection associated with this control.
Position: Returns or sets the position of the T:Wisej.Web.ComponentTool items associated with this control.
DataGridViewHeaderCell: Returns the header cell located in the upper left corner of the DataGridView control.
DataGridViewColumn: Returns or sets the column that displays the node open/close tree icons.
By default the DataGridView shows the open/close tree icons on the first visible and non-frozen column.
Int32: Returns the total number of visible rows currently displayed.
Populates the DataGridView from the data appending the rows to the existing rows.
Parameter | Type | Description |
---|---|---|
data | The object that contains data for the DataGridView to display. | |
dataMember | The name of the table or list in the data object for which the DataGridView should load the data. |
Returns: Int32. Numbers of rows appended.
Use this method to fill a DataGridView without binding it to the data source.
Returns whether all the cells are currently selected.
Parameter | Type | Description |
---|---|---|
includeInvisibleCells | true to include the rows and columns with the Visible property set to false. |
Returns: Boolean. true if all cells (or all visible cells) are selected or if there are no cells (or no visible cells); otherwise, returns false.
Adjusts the width of the column to fit the contents of its cells including the header cell.
Parameter | Type | Description |
---|---|---|
columnIndex | The index of the column to resize; -1 indicates all columns. |
Throws:
ArgumentOutOfRangeException columnIndex is not in the valid range of -1 (all columns) to the number of columns minus 1.
Adjusts the width of the column to fit the contents of its cells including the header cell.
Parameter | Type | Description |
---|---|---|
columnIndex | The index of the column to resize; -1 indicates all columns. | |
extraSpace | Additional space in pixels. |
Throws:
ArgumentOutOfRangeException columnIndex is not in the valid range of -1 (all columns) to the number of columns minus 1.
Adjusts the width of the specified column using the specified size mode.
Parameter | Type | Description |
---|---|---|
columnIndex | The index of the column to resize; -1 indicates all columns. | |
autoSizeMode | One of the DataGridViewAutoSizeColumnMode values. |
Throws:
InvalidOperationException autoSizeMode has the value ColumnHeader and ColumnHeadersVisible is false.
ArgumentException autoSizeMode has the value NotSet, DoubleClick, or Fill.
ArgumentOutOfRangeException columnIndex is not in the valid range of -1 (all columns) to the number of columns minus 1.
Adjusts the width of the specified column using the specified size mode.
Parameter | Type | Description |
---|---|---|
columnIndex | The index of the column to resize; -1 indicates all columns. | |
autoSizeMode | One of the DataGridViewAutoSizeColumnMode values. | |
extraSpace | Additional space in pixels. |
Throws:
InvalidOperationException autoSizeMode has the value ColumnHeader and ColumnHeadersVisible is false.
ArgumentException autoSizeMode has the value NotSet, DoubleClick, or Fill.
ArgumentOutOfRangeException columnIndex is not in the valid range of -1 (all columns) to the number of columns minus 1.
Adjusts the height of the column headers to fit the contents of the largest header.
Adjusts the height of the column headers based on the contents of the header in the specified column.
Parameter | Type | Description |
---|---|---|
columnIndex | The index of the column to resize; -1 indicates all columns. |
Throws:
ArgumentOutOfRangeException columnIndex is not in the valid range of -1 (all columns) to the number of columns minus 1.
Adjusts the width of all columns to fit the contents of their cells including the header cells.
Adjusts the width of all columns to fit the contents of their cells including the header cells.
Parameter | Type | Description |
---|---|---|
extraSpace | Additional space in pixels. |
Adjusts the width of all columns using the specified size mode.
Parameter | Type | Description |
---|---|---|
autoSizeMode | One of the DataGridViewAutoSizeColumnsMode values. |
Throws:
InvalidOperationException autoSizeMode has the value ColumnHeader and ColumnHeadersVisible is false.
ArgumentException autoSizeMode has the value DoubleClick or Fill.
Adjusts the width of all columns using the specified size mode.
Parameter | Type | Description |
---|---|---|
autoSizeMode | One of the DataGridViewAutoSizeColumnsMode values. | |
extraSpace | Additional space in pixels. |
Throws:
InvalidOperationException autoSizeMode has the value ColumnHeader and ColumnHeadersVisible is false.
ArgumentException autoSizeMode has the value DoubleClick or Fill.
Adjusts the height of the row to fit the contents of all its cells including the header cell.
Parameter | Type | Description |
---|---|---|
rowIndex | The index of the row to resize. |
Throws:
ArgumentOutOfRangeException rowIndex is not in the valid range of -1 (all rows) to the number of rows minus 1.
Adjusts the height of the row to fit the contents of all its cells including the header cell.
Parameter | Type | Description |
---|---|---|
rowIndex | The index of the row to resize. | |
extraSpace | Additional space in pixels. |
Throws:
ArgumentOutOfRangeException rowIndex is not in the valid range of -1 (all rows) to the number of rows minus 1.
Adjusts the height of the row using the specified size mode.
Parameter | Type | Description |
---|---|---|
rowIndex | The index of the row to resize. | |
autoSizeMode | One of the DataGridViewAutoSizeRowMode values. |
Throws:
InvalidOperationException autoSizeMode has the value RowHeader and RowHeadersVisible is false.
ArgumentOutOfRangeException rowIndex is not in the valid range of -1 (all rows) to the number of rows minus 1.
Adjusts the height of the row using the specified size mode.
Parameter | Type | Description |
---|---|---|
rowIndex | The index of the row to resize. | |
autoSizeMode | One of the DataGridViewAutoSizeRowMode values. | |
extraSpace | Additional space in pixels. |
Throws:
InvalidOperationException autoSizeMode has the value RowHeader and RowHeadersVisible is false.
ArgumentOutOfRangeException rowIndex is not in the valid range of -1 (all rows) to the number of rows minus 1.
Adjusts the width of the row headers using the specified size mode.
Parameter | Type | Description |
---|---|---|
autoSizeMode | One of the DataGridViewRowHeadersWidthSizeMode values. |
Throws:
ArgumentException autoSizeMode has the value EnableResizing or DisableResizing.
Adjusts the width of the row headers using the specified size mode.
Parameter | Type | Description |
---|---|---|
autoSizeMode | One of the DataGridViewRowHeadersWidthSizeMode values. | |
extraSpace | Additional space in pixels. |
Throws:
ArgumentException autoSizeMode has the value EnableResizing or DisableResizing.
Adjusts the width of the row headers based on the contents of the header in the specified row and using the specified size mode.
Parameter | Type | Description |
---|---|---|
rowIndex | The index of the row header with the changed content. | |
autoSizeMode | One of the DataGridViewRowHeadersWidthSizeMode values. |
Throws:
ArgumentOutOfRangeException rowIndex is not in the valid range of -1 (all rows) to the number of rows minus 1.
ArgumentException autoSizeMode has the value EnableResizing or DisableResizing
Adjusts the width of the row headers based on the contents of the header in the specified row and using the specified size mode.
Parameter | Type | Description |
---|---|---|
rowIndex | The index of the row header with the changed content. | |
autoSizeMode | One of the DataGridViewRowHeadersWidthSizeMode values. | |
extraSpace | Additional space in pixels. |
Throws:
ArgumentOutOfRangeException rowIndex is not in the valid range of -1 (all rows) to the number of rows minus 1.
ArgumentException autoSizeMode has the value EnableResizing or DisableResizing
Adjusts the heights of all rows in the client's data cache to fit the contents of all their cells, including the header cells.
Adjusts the heights of all rows in the client's data cache to fit the contents of all their cells, including the header cells.
Parameter | Type | Description |
---|---|---|
extraSpace | Additional space in pixels. |
Adjusts the heights of the rows using the specified size mode.
Parameter | Type | Description |
---|---|---|
autoSizeMode | One of the DataGridViewAutoSizeRowMode values. |
Throws:
ArgumentException autoSizeMode has the value DoubleClick
InvalidOperationException autoSizeMode has the value RowHeader and RowHeadersVisible is false.
Puts the current cell in edit mode.
Parameter | Type | Description |
---|---|---|
selectAll | true to select all the cell's contents; false to not select any contents. |
Returns: Boolean. true if the current cell is already in edit mode or successfully enters edit mode; otherwise, false.
Throws:
InvalidOperationException CurrentCell is not set to a valid cell.
Prevents the control from updating until the EndUpdate method is called.
Cancels edit mode for the currently selected cell and discards any changes.
Returns: Boolean. true if the cancel was successful; otherwise, false.
Clears the current selection.
Commits changes to cell without ending edit mode.
Returns: Boolean. true if the changes were committed; otherwise false.
Throws:
Exception The cell value could not be committed and either there is no handler for the DataError event or the handler has set the ThrowException property to true.
Commits and ends the edit operation on the current cell.
Returns: Boolean. true if the edit operation is committed and ended; otherwise, false.
Throws:
Exception The cell value could not be committed and either there is no handler for the DataError event or the handler has set the ThrowException property to true.
Resumes updating of the control after it was suspended by the BeginUpdate method.
Populates the DataGridView from the data .
Parameter | Type | Description |
---|---|---|
data | The object that contains data for the DataGridView to display. | |
dataMember | The name of the table or list in the data object for which the DataGridView should load the data. |
Returns: Int32. Numbers of rows added.
Use this method to fill a DataGridView without binding it to the data source.
Returns the formatted values that represent the contents of the selected cells for copying to the Clipboard.
Returns: DataObject. A DataObject with the contents of the selected cells.
Throws:
NotSupportedException ClipboardCopyMode is set to Disable.
Retrieves the value for the specified cell, as formatted for display, without retrieving a DataGridViewRow and without causing the permanent creation of a row instance. This method is particularly useful when the grid shows a large data set and/or it's operating in VirtualMode.
Parameter | Type | Description |
---|---|---|
columnIndex | The index of the column containing the cell. | |
rowIndex | The index of the row containing the cell. |
Returns: Object. The formatted value stored in the cell.
Throws:
ArgumentOutOfRangeException columnIndex is less than 0 or columnIndex is equal to or greater than the number of cells in the collection.
ArgumentOutOfRangeException rowIndex is less than 0.- or - rowIndex is equal to or greater than Count.
Retrieves the value for the specified cell, as formatted for display, without retrieving a DataGridViewRow and without causing the permanent creation of a row instance. This method is particularly useful when the grid shows a large data set and/or it's operating in VirtualMode.
Parameter | Type | Description |
---|---|---|
column | The DataGridViewColumn that contains the cell. | |
rowIndex | The index of the row containing the cell. |
Returns: Object. The formatted value stored in the cell.
Throws:
ArgumentNullException column is null.
ArgumentException The specified column does not belong to the same DataGridView that owns the cells.
ArgumentOutOfRangeException rowIndex is less than 0.- or - rowIndex is equal to or greater than Count.
Retrieves the value for the specified cell, as formatted for display, without retrieving a DataGridViewRow and without causing the permanent creation of a row instance. This method is particularly useful when the grid shows a large data set and/or it's operating in VirtualMode.
Parameter | Type | Description |
---|---|---|
columnName | The Name of the column containing the cell. | |
rowIndex | The index of the row containing the cell. |
Returns: Object. The formatted value stored in the cell.
Throws:
ArgumentException columnName does not match the name of any columns in the control.
ArgumentOutOfRangeException rowIndex is less than 0.- or - rowIndex is equal to or greater than Count.
Returns the state of the DataGridViewRow at the specified index.
Parameter | Type | Description |
---|---|---|
rowIndex | The index of the row. |
Returns: DataGridViewElementStates. A combination of DataGridViewElementStates values indicating the state of the row.
Throws:
ArgumentOutOfRangeException rowIndex is less than zero and greater than the number of rows in the collection.
Retrieves the value for the specified cell without retrieving a DataGridViewRow and without causing the permanent creation of a row instance. This method is particularly useful when the grid shows a large data set and/or it's operating in VirtualMode.
Parameter | Type | Description |
---|---|---|
columnIndex | The index of the column containing the cell. | |
rowIndex | The index of the row containing the cell. |
Returns: Object. The object value stored in the cell.
Throws:
ArgumentOutOfRangeException columnIndex is less than 0 or columnIndex is equal to or greater than the number of cells in the collection.
ArgumentOutOfRangeException rowIndex is less than 0.- or - rowIndex is equal to or greater than Count.
Retrieves the value for the specified cell without retrieving a DataGridViewRow and without causing the permanent creation of a row instance. This method is particularly useful when the grid shows a large data set and/or it's operating in VirtualMode.
Parameter | Type | Description |
---|---|---|
column | The DataGridViewColumn that contains the cell. | |
rowIndex | The index of the row containing the cell. |
Returns: Object. The object value stored in the cell.
Throws:
ArgumentNullException column is null.
ArgumentException The specified column does not belong to the same DataGridView that owns the cells.
ArgumentOutOfRangeException rowIndex is less than 0.- or - rowIndex is equal to or greater than Count.
Retrieves the value for the specified cell without retrieving a DataGridViewRow and without causing the permanent creation of a row instance. This method is particularly useful when the grid shows a large data set and/or it's operating in VirtualMode.
Parameter | Type | Description |
---|---|---|
columnName | The Name of the column containing the cell. | |
rowIndex | The index of the row containing the cell. |
Returns: Object. The object value stored in the cell.
Throws:
ArgumentException columnName does not match the name of any columns in the control.
ArgumentOutOfRangeException rowIndex is less than 0.- or - rowIndex is equal to or greater than Count.
Returns the column index and row index that contain the specified x, y client coordinates.
Parameter | Type | Description |
---|---|---|
x | The x coordinate relative to the DataGridView control. | |
y | The y coordinate relative to the DataGridView control. |
Returns: HitTestInfo. A HitTestInfo that contains the column index and row index information.
Returns the column index and row index that contain the specified x, y client coordinates.
Parameter | Type | Description |
---|---|---|
position | The x, y coordinate relative to the DataGridView control. |
Returns: HitTestInfo. A HitTestInfo that contains the column index and row index information.
Checks if the specified cell can enter edit mode.
Parameter | Type | Description |
---|---|---|
cell | Cell to verify. |
Returns: Boolean. true is the specified cell, the owner row, owner column and the data source, allow user editing.
Checks if the cell at the colIndex and rowIndex location can enter edit mode.
Parameter | Type | Description |
---|---|---|
colIndex | The column index of the cell to verify. | |
rowIndex | The row index of the cell to verify. |
Returns: Boolean. true is the specified cell, the owner row, owner column and the data source, allow user editing.
Checks if the cell at the cellAddress location can enter edit mode.
Parameter | Type | Description |
---|---|---|
cellAddress | Coordinates of the cell to verify. |
Returns: Boolean. true is the specified cell, the owner row, owner column and the data source, allow user editing.
Checks if the specified cell is visible.
Parameter | Type | Description |
---|---|---|
cell | Cell to verify. |
Returns: Boolean. true is the specified cell, the owner row, owner column and the data source, allow user editing.
Checks if the cell at the colIndex and rowIndex location is visible.
Parameter | Type | Description |
---|---|---|
colIndex | The column index of the cell to verify. | |
rowIndex | The row index of the cell to verify. |
Returns: Boolean. true is the specified cell, the owner row, owner column and the data source, allow user editing.
Checks if the cell at the cellAddress location is visible.
Parameter | Type | Description |
---|---|---|
cellAddress | Coordinates of the cell to verify. |
Returns: Boolean. true is the specified cell, the owner row, owner column and the data source, allow user editing.
Verifies that the cell address refers to a valid cell.
Parameter | Type | Description |
---|---|---|
cellAddress | Cell address to verify. |
Returns: Boolean. true if the coordinates correspond to a valid cell address.
Verifies that the column index and row index refer to a valid cell.
Parameter | Type | Description |
---|---|---|
colIndex | The index of the column to verify. | |
rowIndex | The index of the row to verify. |
Returns: Boolean. true if the coordinates correspond to a valid cell address.
Verifies that the column index refer to a valid column.
Parameter | Type | Description |
---|---|---|
colIndex | The index of the column to verify. |
Returns: Boolean. true if the column index corresponds to a valid column.
Verifies that the row index refer to a valid row.
Parameter | Type | Description |
---|---|---|
rowIndex | The index of the row to verify. |
Returns: Boolean. true if the row index corresponds to a valid row.
Notifies the DataGridView that the current cell has uncommitted changes.
Parameter | Type | Description |
---|---|---|
dirty | True to indicate the cell has uncommitted changes; otherwise, false. |
Fires the TopLeftHeaderClick event, if MultiSelect is true, selects all the rows in the control.
Parameter | Type | Description |
---|---|---|
e | A DataGridViewCellMouseEventArgs that contains the event data. |
Throws:
ArgumentOutOfRangeException The value of the ColumnIndex property of e is greater than the number of columns in the control, or the value of the RowIndex property of e is greater than the number of rows in the control.
Forces a full reload of the data displayed by this DataGridView.
Forces a full reload of the data displayed by this DataGridView.
Parameter | Type | Description |
---|---|---|
refreshChildren | True to also refresh all the children of this control. |
Scrolls the specified cell into view.
Parameter | Type | Description |
---|---|---|
cell | The DataGridViewCell to scroll into view. |
Throws:
ArgumentNullException cell is null.
ArgumentException cell doesn't belong to this DataGridView.
Scrolls the specified cell into view aligned according to the position specified by alignX and alignY , if possible.
Parameter | Type | Description |
---|---|---|
cell | The DataGridViewCell to scroll into view. | |
alignX | ||
alignY |
Throws:
ArgumentNullException cell is null.
ArgumentException cell doesn't belong to this DataGridView.
Scrolls the specified cell into view.
Parameter | Type | Description |
---|---|---|
cellAddress | The address of the cell to scroll into view. |
Throws:
ArgumentOutOfRangeException cellAddress .X is less than -1 or greater than the number of columns in the control, or cellAddress .Y is less than -1 or greater than the number of rows in the control.
Scrolls the specified cell into view aligned according to the position specified by alignX and alignY , if possible.
Parameter | Type | Description |
---|---|---|
cellAddress | The address of the cell to scroll into view. | |
alignX | ||
alignY |
Throws:
ArgumentOutOfRangeException cellAddress .X is less than -1 or greater than the number of columns in the control, or cellAddress .Y is less than -1 or greater than the number of rows in the control.
Scrolls the specified cell into view.
Parameter | Type | Description |
---|---|---|
columnIndex | The zero-based column index of the cell to scroll into view. | |
rowIndex | The zero-based row index of the cell to scroll into view. |
Throws:
ArgumentOutOfRangeException columnIndex is less than -1 or greater than the number of columns in the control, or rowIndex is less than -1 or greater than the number of rows in the control.
Scrolls the specified cell into view aligned according to the position specified by alignX and alignY , if possible.
Parameter | Type | Description |
---|---|---|
columnIndex | The zero-based column index of the cell to scroll into view. | |
rowIndex | The zero-based row index of the cell to scroll into view. | |
alignX | ||
alignY |
Throws:
ArgumentOutOfRangeException columnIndex is less than -1 or greater than the number of columns in the control, or rowIndex is less than -1 or greater than the number of rows in the control.
Scrolls the specified column into view.
Parameter | Type | Description |
---|---|---|
columnIndex | The zero-based column index of the cell to scroll into view. |
Throws:
ArgumentOutOfRangeException columnIndex is less than -1 or greater than the number of columns in the control.
Scrolls the specified column into view aligned to the left or right according to the position specified by alignX .
Parameter | Type | Description |
---|---|---|
columnIndex | The zero-based column index of the cell to scroll into view. | |
alignX |
Throws:
ArgumentOutOfRangeException columnIndex is less than -1 or greater than the number of columns in the control.
Scrolls the specified column into view.
Parameter | Type | Description |
---|---|---|
column | The DataGridViewColumnto scroll into view. |
Throws:
ArgumentNullException column is null.
ArgumentException column doesn't belong to this DataGridView.
Scrolls the specified column into view aligned to the left or right according to position specified by alignX .
Parameter | Type | Description |
---|---|---|
column | The DataGridViewColumnto scroll into view. | |
alignX |
Throws:
ArgumentNullException column is null.
ArgumentException column doesn't belong to this DataGridView.
Scrolls the specified row into view.
Parameter | Type | Description |
---|---|---|
rowIndex | The zero-based row index of the cell to scroll into view. |
Throws:
ArgumentOutOfRangeException rowIndex is less than -1 or greater than the number of rows in the control.
Scrolls the specified row into view aligned to the top or bottom according to the position specified by alignY .
Parameter | Type | Description |
---|---|---|
rowIndex | The zero-based row index of the cell to scroll into view. | |
alignY |
Throws:
ArgumentOutOfRangeException rowIndex is less than -1 or greater than the number of rows in the control.
Scrolls the specified row into view.
Parameter | Type | Description |
---|---|---|
row | The DataGridViewRowto scroll into view. |
Throws:
ArgumentNullException row is null.
ArgumentException row doesn't belong to this DataGridView.
Scrolls the specified row into view aligned to the top or bottom according to the position specified by alignY .
Parameter | Type | Description |
---|---|---|
row | The DataGridViewRowto scroll into view. | |
alignY |
Throws:
ArgumentNullException row is null.
ArgumentException row doesn't belong to this DataGridView.
Selects all the cells, or rows, or columns, according to the SelectionMode property when the MultiSelect is true.
Selects all the cells, regardless of the SelectionMode and MultiSelect properties.
Selects all the columns, regardless of the SelectionMode and MultiSelect properties.
Selects all the rows, regardless of the SelectionMode and MultiSelect properties.
Sets the currently focused cell.
Parameter | Type | Description |
---|---|---|
cellAddress | Address of the cell. |
Sets the currently focused cell.
Parameter | Type | Description |
---|---|---|
columnIndex | Column index of the cell. | |
rowIndex | Row index of the cell. |
Sets the state for the row at rowIndex .
Parameter | Type | Description |
---|---|---|
rowIndex | The index of the row. | |
state | DataGridViewElementStates state to set. |
Throws:
ArgumentOutOfRangeException rowIndex is less than zero and greater than the number of rows in the collection.
Sets the value of the specified cell without retrieving a DataGridViewRow and without causing the permanent creation of a row instance. This method is particularly useful when the grid shows a large data set and/or it's operating in VirtualMode.
Parameter | Type | Description |
---|---|---|
columnIndex | The index of the column containing the cell. | |
rowIndex | The index of the row containing the cell. | |
value | Value to store in the cell identified by columnIndex and rowIndex . |
Throws:
ArgumentOutOfRangeException columnIndex is less than 0 or columnIndex is equal to or greater than the number of cells in the collection.
ArgumentOutOfRangeException rowIndex is less than 0.- or - rowIndex is equal to or greater than Count.
Sets the value of the specified cell without retrieving a DataGridViewRow and without causing the permanent creation of a row instance. This method is particularly useful when the grid shows a large data set and/or it's operating in VirtualMode.
Parameter | Type | Description |
---|---|---|
columnName | The Name of the column containing the cell. | |
rowIndex | The index of the row containing the cell. | |
value | Value to store in the cell identified by columnName and rowIndex . |
Throws:
ArgumentException columnName does not match the name of any columns in the control.
ArgumentOutOfRangeException rowIndex is less than 0.- or - rowIndex is equal to or greater than Count.
Sets the value of the specified cell without retrieving a DataGridViewRow and without causing the permanent creation of a row instance. This method is particularly useful when the grid shows a large data set and/or it's operating in VirtualMode.
Parameter | Type | Description |
---|---|---|
column | The DataGridViewColumn that contains the cell. | |
rowIndex | The index of the row containing the cell. | |
value | Value to store in the cell identified by column and rowIndex . |
Throws:
ArgumentNullException column is null.
ArgumentException The specified column does not belong to the same DataGridView that owns the cells.
ArgumentOutOfRangeException rowIndex is less than 0.- or - rowIndex is equal to or greater than Count.
Sorts the contents of the DataGridView control in ascending or descending order based on the contents of the specified column.
Parameter | Type | Description |
---|---|---|
column | The column by which to sort the contents of the DataGridView. | |
direction | One of the ListSortDirection values. |
Throws:
ArgumentException The specified column is not part of this DataGridView; or the DataSource property has been set and the IsDataBound property of the specified column returns false.
ArgumentNullException column is null.
InvalidOperationException The VirtualMode property is set to true and the IsDataBound property of the specified column returns false; or the object specified by the DataSource property does not implement the IBindingList interface; or the object specified by the DataSource property has a SupportsSorting property value of false.
Sorts the contents of the DataGridView control using an implementation of the IComparer interface.
Parameter | Type | Description |
---|---|---|
comparer | An implementation of IComparer that performs the custom sorting operation. |
Throws:
ArgumentNullException comparer is null.
InvalidOperationException VirtualMode is set to true; or DataSource is not null.
Causes the control to update the corresponding client side widget. When in design mode, causes the rendered control to update its entire surface in the designer.
EventHandler Fired when the value of the AllowUserToAddRows property changes.
EventHandler Fired when the value of the AllowUserToDeleteRowsChanged property changes.
EventHandler Fired when the value of the AllowUserToOrderColumns property changes.
EventHandler Fired when the value of the AllowUserToResizeColumns property changes.
EventHandler Fired when the value of the AllowUserToResizeRows property changes.
DataGridViewCellCancelEventHandler Fired when edit mode starts for the selected cell.
DataGridViewCellEventHandler Fired when any part of a cell is clicked.
DataGridViewCellEventHandler Fired when the user double-clicks anywhere in a cell.
DataGridViewCellEventHandler Fired when edit mode stops for the current cell.
DataGridViewCellEventHandler Fired when the current cell changes in the DataGridView control or when the control receives input focus.
DataGridViewCellEventHandler Fired when the value of the ErrorText property of a cell changes.
DataGridViewCellFormattingEventHandler Fired when the contents of a cell need to be formatted for display.
DataGridViewCellEventHandler Fired when a cell loses input focus and is no longer the current cell.
DataGridViewCellMouseEventHandler Occurs whenever the user clicks anywhere on a cell with the mouse.
DataGridViewCellMouseEventHandler Fired when a cell within the DataGridView is double-clicked.
DataGridViewCellMouseEventHandler Fired when the user presses a mouse button while the pointer is within the boundaries of a cell.
DataGridViewCellEventHandler Fired when the mouse pointer enters a cell.
This event fires only if there is an handler attached to it. A simple overload of the On[Event] method in a derived class will not be invoked unless there is at least one handler attached to the event.
DataGridViewCellEventHandler Fired when the mouse pointer leaves a cell.
This event fires only if there is an handler attached to it. A simple overload of the On[Event] method in a derived class will not be invoked unless there is at least one handler attached to the event.
DataGridViewCellMouseEventHandler Fired when the mouse pointer moves over the DataGridView control.
This event fires only if there is an handler attached to it. A simple overload of the On[Event] method in a derived class will not be invoked unless there is at least one handler attached to the event.
DataGridViewCellMouseEventHandler Fired when the user releases a mouse button while over a cell.
DataGridViewCellPaintEventHandler Fired when a cell with the property UserPaint set to true needs to be drawn.
DataGridViewCellParsingEventHandler Fired when a cell leaves edit mode if the cell value has been modified.
DataGridViewCellStateChangedEventHandler Fired when a cell state changes, such as when the cell is selected or focused.
DataGridViewCellEventHandler Fired when the Style property of a DataGridViewCell changes.
DataGridViewCellStyleContentChangedEventHandler Fired when one of the values of a cell style changes.
DataGridViewToolClickEventHandler Fired when a ComponentTool hosted in a cell editor is clicked.
DataGridViewCellEventHandler Fired when the value of the ToolTipText property of a cell changes.
DataGridViewCellToolTipTextNeededEventHandler Fired when a cell's ToolTip text is needed.
DataGridViewCellEventHandler Occurs after the cell has finished validating.
DataGridViewCellValidatingEventHandler Fired when a cell loses input focus, enabling content validation.
DataGridViewCellEventHandler Fired when the value of a cell changes.
DataGridViewColumnEventHandler Fired when a column is added to the control.
DataGridViewColumnEventHandler Fired when the value the DisplayIndex property for a column changes.
DataGridViewColumnEventHandler Fired when the FillWeight property changes.
DataGridViewCellMouseEventHandler Fired when the user clicks a column header.
DataGridViewCellMouseEventHandler Fired when a column header is double-clicked.
EventHandler Fired when the value of the ColumnHeadersHeight property changes.
DataGridViewColumnEventHandler Fired when the value of the MaximumWidth property for a column changes.
DataGridViewColumnEventHandler Fired when the value of the MinimumWidth property for a column changes.
DataGridViewColumnEventHandler Fired when the Name property changes.
DataGridViewColumnEventHandler Fired when a column is removed from the control.
DataGridViewColumnEventHandler Fired when the value of the SortMode property changes.
DataGridViewColumnStateChangedEventHandler Fired when a column changes state, such as becoming visible.
DataGridViewColumnEventHandler Fired when the value of the Width property for a column changes.
EventHandler Fired when the CurrentCell property changes.
DataGridViewBindingCompleteEventHandler Occurs after a data-binding operation has finished.
DataGridViewDataErrorEventHandler Fired when a data parsing or data validation operation throws an exception, or when committing data to a data source fails.
EventHandler Fired when value of the DataMember property changes.
EventHandler Fired when the value of the DataSource property changes.
DataGridViewDataUpdatedEventHandler Fired when the client has updated one or more rows in the grid.
This event is fired only if the application has attached at least one handler to the event. Otherwise, simply overriding OnDataUpdated won't work.
EventHandler Fired when the value of the DefaultRowHeight property changes.
DataGridViewEditingControlShowingEventHandler Fired when a control for editing a cell is showing.
EventHandler Fired when the value of the EditMode property changes.
EventHandler Fired when the value of the KeepSameRowHeight property changes.
DataGridViewCellEventHandler Fired when the user tabs past the last cell.
EventHandler Fired when the value of the LiveResize property changes.
EventHandler Fired when the value of the MultiSelect property changes.
DataGridViewRowEventHandler Fired when the VirtualMode property of the DataGridView is true and the user navigates to the new row at the bottom of the DataGridView.
EventHandler Fired when the value of the ReadOnly property changes.
DataGridViewRowEventHandler Fired when a parent row is collapsed.
DataGridViewCellEventHandler Fired when a row receives input focus but before it becomes the current row.
DataGridViewRowEventHandler Fired when the ErrorText property of a row changes.
DataGridViewRowEventHandler Fired when a parent row is expanded.
DataGridViewCellMouseEventHandler Fired when the user clicks within the boundaries of a row header.
DataGridViewCellMouseEventHandler Fired when a row header is double-clicked.
EventHandler Fired when value of the RowHeadersWidth property changes.
DataGridViewRowEventHandler Fired when the value of the Height property for a row changes.
DataGridViewCellEventHandler Fired when a row loses input focus and is no longer the current row.
DataGridViewRowEventHandler Fired when the value of the MaximumHeight property for a row changes.
DataGridViewRowEventHandler Fired when the value of the MinimumHeight property for a row changes.
DataGridViewRowsAddedEventHandler Occurs after a new row is added to the DataGridView.
DataGridViewRowsRemovedEventHandler Fired when a row or rows are deleted from the DataGridView.
DataGridViewRowStateChangedEventHandler Fired when a row changes state, such as getting selected.
DataGridViewCellEventHandler Occurs after a row has finished validating.
DataGridViewCellCancelEventHandler Fired when a row is validating.
ScrollEventHandler Fired when the user or code scrolls the grid.
This event fires only if there is an handler attached to it. A simple overload of the On[Event] method in a derived class will not be invoked unless there is at least one handler attached to the event.
EventHandler Fired when the current selection changes.
EventHandler Fired when the value of the ShowColumnVisibilityMenu property changes.
EventHandler Fired when the DataGridView control completes a sorting operation.
EventHandler Fired when the value of the StandardTab property changes.
ToolClickEventHandler Fired when a ComponentTool is clicked.
DataGridViewCellCancelEventHandler Fired when the user presses a mouse button while the pointer is on the top-left corner cell.
DataGridViewRowEventHandler Fired when the user has finished adding a row to the DataGridView control.
DataGridViewRowEventHandler Fired when the user has finished deleting a row from the DataGridView control.
DataGridViewRowCancelEventHandler Fired when the user deletes a row from the DataGridView control.
Name | Description |
---|---|
Bindable components implement this interface. | |
All wisej components implement this interface. | |
All wisej controls derived from the Control class must implement this interface. | |
All wisej data stores implement this interface. | |
Represents a Wisej component that is capable of handling postback requests from the client. | |
Allows an object to serialize itself. |