DataGridView.EditingPanel 属性

定义

获取包含 EditingControl 的面板。Gets the panel that contains the EditingControl.

public:
 property System::Windows::Forms::Panel ^ EditingPanel { System::Windows::Forms::Panel ^ get(); };
[System.ComponentModel.Browsable(false)]
public System.Windows.Forms.Panel EditingPanel { get; }
member this.EditingPanel : System.Windows.Forms.Panel
Public ReadOnly Property EditingPanel As Panel

属性值

包含 PanelEditingControlThe Panel that contains the EditingControl.

属性

示例

下面的代码示例演示如何使用 @no__t 1 控件中的 EditingPanel 属性在单元格处于编辑模式时对其进行可视化区分。The following code example illustrates how to use the EditingPanel property in a DataGridView control to visually differentiate a cell when it is in edit mode. 在此示例中,将单元格的编辑面板的 @no__t 设置为 Fixed3DIn this example, the BorderStyle of the cell's editing panel is set to Fixed3D. 若要运行此示例,请将代码粘贴到包含名为 @no__t 的 @no__t 0 的窗体中。To run this example, paste the code into a form that contains a DataGridView named dataGridView1.

this.dataGridView1.EditingPanel.BorderStyle = BorderStyle.Fixed3D;
Me.dataGridView1.EditingPanel.BorderStyle = BorderStyle.Fixed3D

注解

EditingControl 属性不同,当当前单元格不处于编辑模式时,它 @no__t 为-1,@no__t 属性始终可用。Unlike the EditingControl property, which is null when the current cell is not in edit mode, the EditingPanel property is always available.

适用于

另请参阅