DataGridCell(Int32, Int32) コンストラクター

定義

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)

パラメーター

r
Int32

DataGrid の行の番号。

c
Int32

DataGrid の列の番号。

次の例では、 をDataGridCell作成し、新しいインスタンスを コントロールの の System.Windows.Forms.DataGridCurrentCell設定します。

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

適用対象

こちらもご覧ください