DataGridCell(Int32, Int32) 构造函数
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
初始化 DataGridCell 类的新实例。
public:
DataGridCell(int r, int c);
public DataGridCell (int r, int c);
new System.Windows.Forms.DataGridCell : int * int -> System.Windows.Forms.DataGridCell
Public Sub New (r As Integer, c As Integer)
参数
示例
以下示例创建一个DataGridCell并将新实例设置为CurrentCellSystem.Windows.Forms.DataGrid控件。
private:
void SetCell()
{
// Set the focus to the cell specified by the DataGridCell.
DataGridCell dc;
dc.RowNumber = 1;
dc.ColumnNumber = 1;
dataGrid1->CurrentCell = dc;
}
private void SetCell()
{
// Set the focus to the cell specified by the DataGridCell.
DataGridCell dc = new DataGridCell();
dc.RowNumber = 1;
dc.ColumnNumber = 1;
dataGrid1.CurrentCell = dc;
}
Private Sub SetCell()
' Set the focus to the cell specified by the DataGridCell.
Dim dc As DataGridCell
dc.RowNumber = 1
dc.ColumnNumber = 1
DataGrid1.CurrentCell = dc
End Sub