Hi,
I have a Datagrid, and I want to limit the Lenght of the text in a certain
column to a certain number of characters (for exemple 10).
What I want is that, when the user is typing in the column, that he can't
type more than the 10 characters (not that they are concattenated during
input or something like that).
Anybody any idea?
Thansk a lot in advance,
Pieter 7 1774
You have to limit it on the Column object off the Table that is attached to
the datagrid.
Table.Columns(0).MaxLength = 10
I'm not positive that will limit the entry side of things, but I believe
that it does.
Chris
"DraguVaso" <pi**********@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl... Hi,
I have a Datagrid, and I want to limit the Lenght of the text in a certain column to a certain number of characters (for exemple 10).
What I want is that, when the user is typing in the column, that he can't type more than the 10 characters (not that they are concattenated during input or something like that).
Anybody any idea?
Thansk a lot in advance,
Pieter
It works, but not at keypress time.
I think you might have to create your own class and overide the keypress event if you want
to achieve
the effect of discarding the keystroke when the limit is reached.
"Chris, Master of all Things Insignificant" <chris@No_Spam_Please.com> wrote in message
news:O$**************@TK2MSFTNGP11.phx.gbl... You have to limit it on the Column object off the Table that is attached to the datagrid.
Table.Columns(0).MaxLength = 10
I'm not positive that will limit the entry side of things, but I believe that it does.
Chris
"DraguVaso" <pi**********@hotmail.com> wrote in message news:%2****************@TK2MSFTNGP10.phx.gbl... Hi,
I have a Datagrid, and I want to limit the Lenght of the text in a certain column to a certain number of characters (for exemple 10).
What I want is that, when the user is typing in the column, that he can't type more than the 10 characters (not that they are concattenated during input or something like that).
Anybody any idea?
Thansk a lot in advance,
Pieter
Yep, that's what you will have to do then. Unless someone smarter than me
know something I don't.
Chris
"Mark Jones" <no**************@devnullbucket.org> wrote in message
news:41***********************@news.twtelecom.net. .. It works, but not at keypress time.
I think you might have to create your own class and overide the keypress event if you want to achieve the effect of discarding the keystroke when the limit is reached.
"Chris, Master of all Things Insignificant" <chris@No_Spam_Please.com> wrote in message news:O$**************@TK2MSFTNGP11.phx.gbl... You have to limit it on the Column object off the Table that is attached to the datagrid.
Table.Columns(0).MaxLength = 10
I'm not positive that will limit the entry side of things, but I believe that it does.
Chris
"DraguVaso" <pi**********@hotmail.com> wrote in message news:%2****************@TK2MSFTNGP10.phx.gbl... > Hi, > > I have a Datagrid, and I want to limit the Lenght of the text in a > certain > column to a certain number of characters (for exemple 10). > > What I want is that, when the user is typing in the column, that he > can't > type more than the 10 characters (not that they are concattenated > during > input or something like that). > > Anybody any idea? > > Thansk a lot in advance, > > Pieter > >
set DataGridTextBoxColumn.TextBox.MaxLength to 10 in code. I think you know
where to use DataGridTextBoxColumn.
ok thanks!
"Rulin Hong" <Ru*******@discussions.microsoft.com> wrote in message
news:5A**********************************@microsof t.com... set DataGridTextBoxColumn.TextBox.MaxLength to 10 in code. I think you
know where to use DataGridTextBoxColumn.
how do you use datagridtextboxcolumn?
"Rulin Hong" wrote: set DataGridTextBoxColumn.TextBox.MaxLength to 10 in code. I think you know where to use DataGridTextBoxColumn.
Dim tbc As DataGridTextBoxColumn = CType(tbsTabelStyle.GridColumnStyles(3),
DataGridTextBoxColumn)
AddHandler tbc.TextBox.MouseMove, AddressOf TextBox_MouseMove
AddHandler tbc.TextBox.TextChanged, AddressOf TextBox_TextChanged
"David Baumgarten" <Da*************@discussions.microsoft.com> wrote in
message news:A5**********************************@microsof t.com... how do you use datagridtextboxcolumn?
"Rulin Hong" wrote:
set DataGridTextBoxColumn.TextBox.MaxLength to 10 in code. I think you
know where to use DataGridTextBoxColumn. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Urban |
last post by:
hi,
I have a question.
Maybe You know the equivalent to command LIMIT from MySQL
I couldn`t find something like this in MS SQL
PS
I try to display 10 records begining form e.g. 4 sort by id...
|
by: Rakesh |
last post by:
Hi,
Is there any limit to the number of rows a datagrid can display?
Thanks,
Rakesh
|
by: Jax |
last post by:
Only way I can figure it at present is to do some string manipulation so I can catch the '.' and count the chars and cut after a certain point
Does anyone know an easier way to do this? The data is...
|
by: PeterZ |
last post by:
Hi,
In a running C# app with a datagrid control I select all rows in the
dataGrid using CTRL-A, I then paste into some other app like notepad or Word
but the column headings get left off.
Is...
|
by: Aaron Smith |
last post by:
Is there a way to put a limit on the text size of a datagrid column?
Thanks,
Aaron
--
---
Aaron Smith
Remove -1- to E-Mail me. Spam Sucks.
|
by: DraguVaso |
last post by:
Hi,
I have a Datagrid, and I want to limit the Lenght of the text in a certain
column to a certain number of characters (for exemple 10).
What I want is that, when the user is typing in the...
|
by: Melson |
last post by:
Hi
I've a problem. Can anyone help. I would like to use datagrid for data
entry. How can I set the number of rows in the datagrid. And use the
datagrid to update the ms sql table.
regards...
|
by: JohnR |
last post by:
I have a datatable as the datasource to a datagrid. The datagrid has a
datagridtablestyle defined. I use the datagridtablestyle to change the
order of the columns (so they can be different than...
|
by: =?Utf-8?B?Y3JlYXZlczA2MjI=?= |
last post by:
I have a nested datagrid in a xaml file, the parent datagrid loads the vendor
information and the details loads the documents for that vendor in a
datagrid. Everything is working fine until I click...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
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...
|
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,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
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...
| |