次の方法で共有


DataGridCell コンストラクタ

DataGridCell クラスの新しいインスタンスを初期化します。

Public Sub New( _
   ByVal r As Integer, _   ByVal c As Integer _)
[C#]
public DataGridCell(
   intr,intc);
[C++]
public: DataGridCell(
   intr,intc);
[JScript]
public function DataGridCell(
   r : int,c : int);

パラメータ

使用例

[Visual Basic, C#, C++] DataGridCell を作成し、その新しいインスタンスを System.Windows.Forms.DataGrid コントロールの CurrentCell に設定する例を次に示します。

 
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


[C#] 
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;
}


[C++] 
private:
void SetCell()
{
   // Set the focus to the cell specified by the DataGridCell.
   DataGridCell dc;
   dc.RowNumber = 1;
   dc.ColumnNumber = 1;
   dataGrid1->CurrentCell = dc;
}

[JScript] JScript のサンプルはありません。Visual Basic、C#、および C++ のサンプルを表示するには、このページの左上隅にある言語のフィルタ ボタン 言語のフィルタ をクリックします。

必要条件

プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ, .NET Compact Framework - Windows CE .NET

参照

DataGridCell 構造体 | DataGridCell メンバ | System.Windows.Forms 名前空間 | CurrentCell | DataColumn | DataGrid | DataRow | ColumnNumber | RowNumber