DataGridTextBox Class
Represents a TextBox control that is hosted in a DataGridTextBoxColumn.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
The DataGridTextBox and the DataGridTextBoxColumn work together so that users can directly edit values in a DataGrid control column. The DataGridTextBoxColumn derives from DataGridColumnStyle, and is designed to host the DataGridTextBox, which derives from the TextBox control.
In addition to the properties, events, and methods of the base control, you can call the KeyPress and KeyDown events with the OnKeyPress and OnMouseDown methods.
The following code example demonstrates how to get the DataGridTextBox hosted by a DataGridTextBoxColumn.
Private Sub GetDataGridTextBox() ' Gets the DataGridTextBoxColumn from the DataGrid control. Dim myTextBoxColumn As DataGridTextBoxColumn ' Assumes the CompanyName column is a DataGridTextBoxColumn. myTextBoxColumn = CType(dataGrid1.TableStyles(0). _ GridColumnStyles("CompanyName"), DataGridTextBoxColumn) ' Gets the DataGridTextBox for the column. Dim myGridTextBox As DataGridTextBox myGridTextBox = CType(myTextBoxColumn.TextBox, DataGridTextBox) End Sub
System.MarshalByRefObject
System.ComponentModel.Component
System.Windows.Forms.Control
System.Windows.Forms.TextBoxBase
System.Windows.Forms.TextBox
System.Windows.Forms.DataGridTextBox
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.