Export (0) Print
Expand All
Expand Minimize

DataGridViewCell.PositionEditingPanel Method

Note: This method is new in the .NET Framework version 2.0.

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
)
public Rectangle PositionEditingPanel (
	Rectangle cellBounds, 
	Rectangle cellClip, 
	DataGridViewCellStyle cellStyle, 
	boolean singleVerticalBorderAdded, 
	boolean singleHorizontalBorderAdded, 
	boolean isFirstDisplayedColumn, 
	boolean isFirstDisplayedRow
)
public function PositionEditingPanel (
	cellBounds : Rectangle, 
	cellClip : Rectangle, 
	cellStyle : DataGridViewCellStyle, 
	singleVerticalBorderAdded : boolean, 
	singleHorizontalBorderAdded : boolean, 
	isFirstDisplayedColumn : boolean, 
	isFirstDisplayedRow : boolean
) : Rectangle

Parameters

cellBounds

A Rectangle that defines the cell bounds.

cellClip

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

cellStyle

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

singleVerticalBorderAdded

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

singleHorizontalBorderAdded

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

isFirstDisplayedColumn

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

isFirstDisplayedRow

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

Return Value

A Rectangle that represents the normal bounds of the editing control within the editing panel.

Exception typeCondition

InvalidOperationException

The cell has not been added to a DataGridView control.

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

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

.NET Framework

Supported in: 2.0

Community Additions

ADD
Show:
© 2014 Microsoft