473,395 Members | 2,010 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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
1 2650
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Edward Mitchell | last post by:
I have a database with text string fields defined by varchar(nnn). When I request from the user the text from a textbox, I'd like to set the maximum number of characters in the textbox to the...
6
by: Mike Kirkpatrick | last post by:
I have this data grid which consists of 3 pick lists. The first pick list is to affect the data binding of the other two. I have figured out how to do the data binding by column. However, I do not...
6
by: Hutty | last post by:
I've looked around and have yet to find anything that would answer my question regarding formating a column in a datagrid. My grid looks like this as far as data" AMHQCON|51300.01|-3147 The...
2
by: pmud | last post by:
Hi, I am exporting data from an EDITABLE DATA GRID EXCEL. But the 1st column in data grid is Edit Column. I want to display all columns in Excel except for the Edit column. The following...
1
by: Josh | last post by:
Using Visual Studio 2003, C#, .NET 1.1. I have a web form with a few textboxes, a couple of dropdown lists, and a data grid. The data grid is populated from a SQL stored procedure. The user...
3
by: gilbert3b2g | last post by:
I'm new to Python, and programming in general. What I'm trying to do here is to load a list of accounts from a file on my harddrive into a string of Buttons in Tkinter, and when I press one of the...
2
by: schaapiee | last post by:
Is there a way to define how long the data columns are, display wise on the Form? Whether I am using a boolean field (checkbox) or a string field (text url) each displays with the same size. I...
1
by: Mel | last post by:
Anyone know how I would retrieve the MaxLength property of a column in my Access Database table? I know how to retrieve table data, for example the "Quote #" field in my example code below, but I...
6
by: insirawali | last post by:
Hi all, I have this problem, i need to know is there a way i cn use the data adapter's update method in this scenario. i have 3 tables as below create table table1{ id1 int identity(1,1)...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.