Export (0) Print
Expand All
Expand Minimize

DataGridViewCell.PositionEditingPanel Method

Sets the location and size of the editing panel hosted by the cell, and returns the normal bounds of the editing control within the editing panel.

Namespace:  System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public virtual Rectangle PositionEditingPanel(
	Rectangle cellBounds,
	Rectangle cellClip,
	DataGridViewCellStyle cellStyle,
	bool singleVerticalBorderAdded,
	bool singleHorizontalBorderAdded,
	bool isFirstDisplayedColumn,
	bool isFirstDisplayedRow
)

Parameters

cellBounds
Type: System.Drawing.Rectangle

A Rectangle that defines the cell bounds.

cellClip
Type: System.Drawing.Rectangle

The area that will be used to paint the editing panel.

cellStyle
Type: System.Windows.Forms.DataGridViewCellStyle

A DataGridViewCellStyle that represents the style of the cell being edited.

singleVerticalBorderAdded
Type: System.Boolean

true to add a vertical border to the cell; otherwise, false.

singleHorizontalBorderAdded
Type: System.Boolean

true to add a horizontal border to the cell; otherwise, false.

isFirstDisplayedColumn
Type: System.Boolean

true if the cell is in the first column currently displayed in the control; otherwise, false.

isFirstDisplayedRow
Type: System.Boolean

true if the cell is in the first row currently displayed in the control; otherwise, false.

Return Value

Type: System.Drawing.Rectangle
A Rectangle that represents the normal bounds of the editing control within the editing panel.

ExceptionCondition
InvalidOperationException

The cell has not been added to a DataGridView control.

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft