By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,649 Members | 2,142 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,649 IT Pros & Developers. It's quick & easy.

MaxLength of data in grid column

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/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" <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.