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);
パラメータ
- r
System.Windows.Forms.DataGrid の行の番号。 - c
System.Windows.Forms.DataGrid の列の番号。
使用例
[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