We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

DataGridTextBoxColumn maxlength

while adding tablestyles to a datagrid how do i set the max length of the column.

1 Reply

CB Clay Burch Syncfusion Team July 27, 2002 07:01 AM UTC

If you are adding DataGridTextBoxColumn objects to your DataGridTableStyle, then you can set the MaxLength property on the TextBox property of the DataGridTextBoxColumn.
' Add a second column style.
  Dim TextCol As DataGridTextBoxColumn
  TextCol = New DataGridTextBoxColumn()
  TextCol.MappingName = "custName"
  TextCol.HeaderText = "Customer Name"
  TextCol.Width = 250
  TextCol.TextBox.MaxLength = 8 'max 8 chars

Live Chat Icon For mobile
Up arrow icon