Sdílet prostřednictvím


DataGridCell(Int32, Int32) Konstruktor

Definice

Inicializuje novou instanci DataGridCell třídy.

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

Počet řádků v sadě DataGrid.

c
Int32

Počet sloupců v sadě DataGrid.

Příklady

Následující příklad vytvoří DataGridCell a nastaví novou instanci na CurrentCell System.Windows.Forms.DataGrid ovládací prvek.

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

Platí pro

Viz také