MaxLength of data in grid column

  • Thread starter Thread starter Anthony
  • Start date Start date
A

Anthony

I am defining the datagridtable style for a grid

....
Dim coursekeycol As New DataGridTextBoxColumn
coursekeycol.MappingName = COURSEKEYCOLNAME
coursekeycol.HeaderText = ""
coursekeycol.Width = COURSEKEYCOLWIDTH
....

I am wondering, how to I set the cells so that the user
can only put a maximum of x characters, like the maxlength
in a text box??

thanks,
A..
 
You can do this by setting the max length property of the data column in
the dataset. You will need to write code for though something like this:

DatasetInstance.Table.Column.MaxLength=x

Hope this helps,
Eric - VB.Net team


--------------------
| Content-Class: urn:content-classes:message
| From: "Anthony" <[email protected]>
| Sender: "Anthony" <[email protected]>
| Subject: MaxLength of data in grid column
| Date: Thu, 25 Sep 2003 11:44:53 -0700
|
| I am defining the datagridtable style for a grid
|
| ...
| Dim coursekeycol As New DataGridTextBoxColumn
| coursekeycol.MappingName = COURSEKEYCOLNAME
| coursekeycol.HeaderText = ""
| coursekeycol.Width = COURSEKEYCOLWIDTH
| ...
|
| I am wondering, how to I set the cells so that the user
| can only put a maximum of x characters, like the maxlength
| in a text box??
|
| thanks,
| A..
|
 
Back
Top