DataGridCell(Int32, Int32) Konstruktor

Definition

Initialisiert eine neue Instanz der DataGridCell-Klasse.

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)

Parameter

r
Int32

Die Nummer einer Zeile in DataGrid.

c
Int32

Die Nummer einer Spalte in DataGrid.

Beispiele

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

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

Gilt für:

Weitere Informationen