DataGridTableStyle.DataGrid Propiedad

Definición

Obtiene o establece el control DataGrid de la tabla dibujada.

public:
 virtual property System::Windows::Forms::DataGrid ^ DataGrid { System::Windows::Forms::DataGrid ^ get(); void set(System::Windows::Forms::DataGrid ^ value); };
[System.ComponentModel.Browsable(false)]
public virtual System.Windows.Forms.DataGrid DataGrid { get; set; }
[<System.ComponentModel.Browsable(false)>]
member this.DataGrid : System.Windows.Forms.DataGrid with get, set
Public Overridable Property DataGrid As DataGrid

Valor de propiedad

DataGrid

Control DataGrid que muestra la tabla.

Atributos

Ejemplos

En el ejemplo de código siguiente se imprime el CurrentCell objeto de que System.Windows.Forms.DataGrid muestra un DataGridTableStyleobjeto .

private:
   void GetSelectedIndex( DataGridTableStyle^ myGridTable )
   {
      /* Get the name of the DataGrid of the DataGridTable 
         passed as an argument. */
      Console::WriteLine( myGridTable->DataGrid->CurrentCell.ToString() );
   }
private void GetSelectedIndex(DataGridTableStyle myGridTable)
{
   /* Get the name of the DataGrid of the DataGridTable 
      passed as an argument. */
   Console.WriteLine(myGridTable.DataGrid.CurrentCell.ToString());
}
Private Sub GetSelectedIndex(myGridTable As DataGridTableStyle)
    ' Get the name of the DataGrid of the DataGridTable 
    ' passed as an argument. 
    Console.WriteLine(myGridTable.DataGrid.CurrentCell.ToString())
End Sub

Comentarios

El System.Windows.Forms.DataGrid control muestra los datos en forma de cuadrícula. DataGridTableStyle es un objeto que representa la cuadrícula dibujada. La System.Windows.Forms.DataGrid propiedad devuelve una referencia al control que muestra la cuadrícula.

La DataGrid propiedad se establece cuando se agrega a DataGridTableStyle .System.Windows.Forms.DataGrid GridTableStylesCollection No debe intentar establecer esta propiedad a menos que la invalide y cree un diseñador para un control de usuario que incorpore el DataGrid control .

Se aplica a