C1 Community
ComponentOne Community is a free source for developers and help authors to collaborate and communicate.

c1numericedit problem with mask and prevalidation error

rated by 0 users
This post has 0 Replies | 1 Follower

Not Ranked
Posts 12
mbfsjft Posted: Tue, Apr 21 2009 4:14 PM

Using c1numericedit version 2.0.20071.32002 in a .net 2.0 application, VB.NET 2005.

Placing control into a tablelayoutpanel at run time with this code:

ElseIf (sSQLType = "NUMERIC") Or _

(sSQLType = "FLOAT") Then

Dim tbnew As New C1.Win.C1Input.C1NumericEdit

tbnew.Name = sCName

tbnew.Font =
Me.Font

tbnew.Width = (8 * 6) + 25

Dim smask As String = myRM.GetString(sCName & "_MASK")

If Not (smask Is Nothing) Then

tbnew.EditMask = smask

End If

tbnew.VisibleButtons = C1.Win.C1Input.DropDownControlButtonFlags.DropDown

tbnew.Anchor = _

(AnchorStyles.Left
Or AnchorStyles.Bottom Or AnchorStyles.Top)

tbnew.DataBindings.Add("text", myDS, sFullCName, True)

AddHandler tbnew.TextChanged, AddressOf Me.HandleTextChanges

tlpEdit.Controls.Add(tbnew, 1, iTLPRowCnt - 1)

sHint = myRM.GetString(sCName &
"_HINT")

If Not (sHint Is Nothing) Then

TT1.SetToolTip(tbnew, sHint)

End If

smask has been set to, for one field,

!990.^99

990.^99

^990.99

 

i tried to enter 3.27 into the field and receive a popup of "prevalidation error."  The only way to enter this is "00327" or "003.27"

But I thought that 9 was an OPTIONAL digit.

I could have 105.97, 3, 2.82, 15.8 or any other combination of 1-3 digits to left and 0-2 digits to the right of decimal.  Your tutorial gaves me no help whatsoever in decoding the precise and complete and exact syntax of the edit mask.

 Where is the comprehensive tutorial and what have I done wrong with the above mask attempts?

Furthermore, if someone makes an incorrect entry, there is no way to close the form and abandon changes unless one enters what the edit mask is telling the control to expect.  How do I correct that anomaly?

Thanks
John

Page 1 of 1 (1 items) | RSS
Contact ComponentOne: 1.800.858.2739 ©1987-2010 ComponentOne LLC All Rights Reserved.