DataGridCell(Int32, Int32) Konstruktor

Definicja

Inicjuje nowe wystąpienie klasy 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)

Parametry

r
Int32

Liczba wierszy w obiekcie DataGrid.

c
Int32

Liczba kolumn w elemecie DataGrid.

Przykłady

Poniższy przykład tworzy obiekt DataGridCell i ustawia nowe wystąpienie na CurrentCell kontrolkę System.Windows.Forms.DataGrid .

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

Dotyczy

Zobacz też