Partilhar via


DataGridTextBoxColumn.TextBox Propriedade

Definição

Obtém o controle TextBox hospedado.

public:
 virtual property System::Windows::Forms::TextBox ^ TextBox { System::Windows::Forms::TextBox ^ get(); };
[System.ComponentModel.Browsable(false)]
public virtual System.Windows.Forms.TextBox TextBox { get; }
[<System.ComponentModel.Browsable(false)>]
member this.TextBox : System.Windows.Forms.TextBox
Public Overridable ReadOnly Property TextBox As TextBox

Valor da propriedade

Um controle TextBox hospedado pela coluna.

Atributos

Exemplos

O exemplo a seguir altera a cor da tela de fundo do controle hospedado TextBox .

Private Sub SetTextBoxBgColor()
   Dim myGridTextBox As DataGridTextBox
   Dim myColumnTextColumn As DataGridTextBoxColumn
   ' Assumes there is a DataGridTextBoxColumn 
   ' already created in  the DataGrid control.
   myColumnTextColumn = CType(DataGrid1.TableStyles("Customers"). _
   GridColumnStyles("FirstName"), DataGridTextBoxColumn)
   myGridTextBox = CType(myColumnTextColumn.TextBox, _
   DataGridTextBox)
   ' Change the background color.
   myGridTextBox.BackColor = System.Drawing.Color.Red
End Sub

Aplica-se a

Confira também