Hi,
Create a new datagridtextboxcolumn for that.
Public Class UpperCaseColumn
Inherits DataGridTextBoxColumn
Protected Overloads Overrides Sub Edit(ByVal source As
System.Windows.Forms.CurrencyManager, ByVal rowNum As Integer, ByVal
bounds As System.Drawing.Rectangle, ByVal [readOnly] As Boolean, ByVal
instantText As String, ByVal cellIsVisible As Boolean)
MyBase.Edit(source, rowNum, bounds, [readOnly], instantText,
cellIsVisible)
MyBase.TextBox.CharacterCasing = CharacterCasing.Upper
End Sub
Protected Overrides Function GetColumnValueAtRow(ByVal source As
System.Windows.Forms.CurrencyManager, ByVal rowNum As Integer) As Object
Dim obj As Object
obj = MyBase.GetColumnValueAtRow(source, rowNum)
Return obj.ToString.ToUpper
End Function
End Class
Ken
-------------------------
_____
From: Randy Fraser [mailto:b1******@sympatico.ca]
Sent: Tuesday, June 22, 2004 4:05 PM
To: microsoft.public.dotnet.languages.vb
Subject: Uppercase
Could someone tell me how I can force uppercase characters in a TextBox
column in a datagrid?
Thanks
Randy
--
Incoming mail is certified Virus Free.
Checked by AVG Anti-Virus (
http://www.grisoft.com).
Version: 7.0.230 / Virus Database: 263.3.3 - Release Date: 6/18/2004
--
Outgoing mail is certified Virus Free.
Checked by AVG Anti-Virus (
http://www.grisoft.com).
Version: 7.0.230 / Virus Database: 263.3.3 - Release Date: 6/18/2004