DataGridTextBoxColumn.TextBox Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the hosted TextBox control.
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
Property Value
A TextBox control hosted by the column.
- Attributes
Examples
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, _
DataGridTextBox)
' Change the background color.
myGridTextBox.BackColor = System.Drawing.Color.Red
End Sub
Applies to
See also
Συνεργαστείτε μαζί μας στο GitHub
Μπορείτε να βρείτε την πηγή για αυτό το περιεχόμενο στο GitHub, όπου μπορείτε επίσης να δημιουργήσετε και να εξετάσετε ζητήματα και αιτήματα έλξης. Για περισσότερες πληροφορίες, ανατρέξτε στον οδηγό συνεργατών.