DataGridTextBoxColumn.TextBox DataGridTextBoxColumn.TextBox DataGridTextBoxColumn.TextBox DataGridTextBoxColumn.TextBox Property


Ruft das gehostete TextBox-Steuerelement ab.Gets the hosted TextBox control.

 virtual property System::Windows::Forms::TextBox ^ TextBox { System::Windows::Forms::TextBox ^ get(); };
public virtual System.Windows.Forms.TextBox TextBox { get; }
member this.TextBox : System.Windows.Forms.TextBox
Public Overridable ReadOnly Property TextBox As TextBox


Ein TextBox-Steuerelement, das von der Spalte gehostet wird.A TextBox control hosted by the column.


Im folgenden Beispiel wird die Hintergrundfarbe des gehosteten TextBox Steuer Elements geändert.The following example changes the background color of the hosted TextBox control.

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, _
   ' Change the background color.
   myGridTextBox.BackColor = System.Drawing.Color.Red
End Sub

Gilt für:

Siehe auch