Freigeben über


DataGridCell-Konstruktor

Initialisiert eine neue Instanz der DataGridCell-Klasse.

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in system.windows.forms.dll)

Syntax

'Declaration
Public Sub New ( _
    r As Integer, _
    c As Integer _
)
'Usage
Dim r As Integer
Dim c As Integer

Dim instance As New DataGridCell(r, c)
public DataGridCell (
    int r,
    int c
)
public:
DataGridCell (
    int r, 
    int c
)
public DataGridCell (
    int r, 
    int c
)
public function DataGridCell (
    r : int, 
    c : int
)

Parameter

  • c
    Die Nummer einer Spalte in System.Windows.Forms.DataGrid.

Beispiel

Im folgenden Beispiel wird eine DataGridCell erstellt und die neue Instanz auf CurrentCell eines System.Windows.Forms.DataGrid-Steuerelements festgelegt.

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
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:
   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.set_RowNumber(1);
    dc.set_ColumnNumber(1);
    dataGrid1.set_CurrentCell(dc);
} //SetCell

Plattformen

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile für Pocket PC, Windows Mobile für Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

.NET Framework unterstützt nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen.

Versionsinformationen

.NET Framework

Unterstützt in: 2.0, 1.1, 1.0

.NET Compact Framework

Unterstützt in: 2.0, 1.0

Siehe auch

Referenz

DataGridCell-Struktur
DataGridCell-Member
System.Windows.Forms-Namespace
DataGrid.CurrentCell-Eigenschaft
DataColumn
DataGrid-Klasse
DataRow
ColumnNumber
RowNumber