DataGridTableStyle.DataGrid Propriété

Définition

Obtient ou définit le contrôle DataGrid pour la table dessinée.

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

Valeur de propriété

DataGrid

Contrôle DataGrid qui affiche la table.

Attributs

Exemples

L’exemple de code suivant imprime l’affichage CurrentCell System.Windows.Forms.DataGrid d’un 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

Remarques

Le System.Windows.Forms.DataGrid contrôle affiche les données sous la forme d’une grille. Il DataGridTableStyle s’agit d’un objet qui représente la grille dessinée. La System.Windows.Forms.DataGrid propriété retourne une référence au contrôle qui affiche la grille.

La DataGrid propriété est définie lorsqu’un DataGridTableStyle contrôle est ajouté.System.Windows.Forms.DataGrid GridTableStylesCollection Vous ne devez pas essayer de définir cette propriété, sauf si vous le substituez et que vous créez un concepteur pour un contrôle utilisateur qui incorpore le DataGrid contrôle.

S’applique à