DataGridCell(Int32, Int32) Costruttore

Definizione

Inizializza una nuova istanza della classe 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)

Parametri

r
Int32

Il numero di una riga nell'oggetto DataGrid.

c
Int32

Il numero di una colonna nell'oggetto DataGrid.

Esempio

Nell'esempio seguente viene creato un oggetto DataGridCell e viene impostata la nuova istanza su CurrentCell di un System.Windows.Forms.DataGrid controllo .

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

Si applica a

Vedi anche