Agnes,
Did you see my sample of the column in the language.vb group.
This is almost the same sample however in another way, there is also the
limitation of the textboxcolumn in.
I hope this helps?
Cor
\\\
Private Sub Form7_Load(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
Dim dt As New DataTable("Agnes")
dt.Columns.Add("Cor")
For i As Integer = 0 To 4
Dim dr As DataRow = dt.NewRow
dr(0) = (i + 1).ToString
dt.Rows.Add(dr)
Next
Dim dv As New DataView(dt)
Me.DataGrid1.DataSource = dv
Dim ts As New DataGridTableStyle
ts.MappingName = "Agnes"
Dim column As New DataGridTextBoxColumn
column.TextBox.MaxLength = 4
column.MappingName = "Cor"
column.HeaderText = "Ident"
column.NullText = String.Empty
ts.GridColumnStyles.Add(column)
DataGrid1.TableStyles.Add(ts)
End Sub
///