DataGridTextBoxColumn.TextBox 属性      
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取寄宿的 TextBox 控件。
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.TextBoxPublic Overridable ReadOnly Property TextBox As TextBox属性值
该列承载的一个 TextBox 控件。
- 属性
示例
以下示例更改托管 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