467,923 Members | 1,232 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,923 developers. It's quick & easy.

MaxLength of data in grid column

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..
Nov 20 '05 #1
  • viewed: 2470
Share:
1 Reply
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" <to**@scd.edu>
| Sender: "Anthony" <to**@scd.edu>
| 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..
|

Nov 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Mike Kirkpatrick | last post: by
6 posts views Thread by Hutty | last post: by
3 posts views Thread by gilbert3b2g | last post: by
2 posts views Thread by schaapiee | last post: by
1 post views Thread by Mel | last post: by
6 posts views Thread by insirawali | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.