Hi,
Here is a class that inherits from a datagridtextboxcolumn that should
work.
Public Class MaxLengthColumn
Inherits DataGridTextBoxColumn
Private mintLen As Integer = 256
Public Property MaxLength() As Integer
Get
Return mintLen
End Get
Set(ByVal Value As Integer)
mintLen = Value
End Set
End Property
Protected Overloads Overrides Sub Edit(ByVal source As
System.Windows.Forms.CurrencyManager, ByVal rowNum As Integer, ByVal
bounds As System.Drawing.Rectangle, ByVal [readOnly] As Boolean, ByVal
instantText As String, ByVal cellIsVisible As Boolean)
MyBase.Edit(source, rowNum, bounds, [readOnly], instantText,
cellIsVisible)
MyBase.TextBox.MaxLength = mintLen
End Sub
End Class
Ken
-------------------