DataGridTextBoxColumn::TextBox Property
.NET Framework (current version)
Gets the hosted TextBox control.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
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
.NET Framework
Available since 1.1
Available since 1.1
Show: