DataGridTableStyle.DataGrid Propiedad

Definición

Obtiene o establece el control DataGrid de la tabla dibujada.Gets or sets the DataGrid control for the drawn table.

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; }
member this.DataGrid : System.Windows.Forms.DataGrid with get, set
Public Overridable Property DataGrid As DataGrid

Valor de propiedad

Control DataGrid que muestra la tabla.The DataGrid control that displays the table.

Atributos

Ejemplos

En el ejemplo de código siguiente se imprime el CurrentCell del System.Windows.Forms.DataGrid que muestra un DataGridTableStyle.The following code example prints the CurrentCell of the System.Windows.Forms.DataGrid displaying a DataGridTableStyle.

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 control System.Windows.Forms.DataGrid muestra los datos en formato de cuadrícula.The System.Windows.Forms.DataGrid control displays data in the form of a grid. El DataGridTableStyle es un objeto que representa la cuadrícula dibujada.The DataGridTableStyle is an object that represents the drawn grid. La propiedad System.Windows.Forms.DataGrid devuelve una referencia al control que muestra la cuadrícula.The System.Windows.Forms.DataGrid property returns a reference to the control that is displaying the grid.

La propiedad DataGrid se establece cuando se agrega un DataGridTableStyle a un GridTableStylesCollection del control System.Windows.Forms.DataGrid.The DataGrid property is set when a DataGridTableStyle is added to a System.Windows.Forms.DataGrid control's 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 control DataGrid.You should not try to set this property unless you are overriding it and creating a designer for a user control that incorporates the DataGrid control.

Se aplica a