Welcome to WindowsClient.net | Sign in | Join

SmartClient - Data Validation

This video covers how and when to validate during data entry with examples for individual controls and interdependent controls and includes Regular Expressions techniques.

Author: Pat Tormey

Duration: 24:41

Video Downloads:
WMV | WMV (Zip) | Zune | iPod | PSP | MPEG-4 | 3GP

Audio Downloads:
AAC | WMA | MPEG-4 | MPEG-3 | MPEG-2

Sample Code:
VB | C#

You must Login to comment.Comments: 4

Terminator92115: On April 22, 2008 10:13 PM said:

Thanks Pat for this great intro into Windows Forms Data Validation. I found it easy to follow and understant. I have some feed back for you. After watching this video I tried to implement Data Validation and got stuck on how detect if any of the Form Controld had invalid data. After a little research I found that you need to set the Cancel Property of the e Argument to True. Then Me.ValidateChildren() will return false and you can add logic to prevent the user going any further until all data validation passes. Thanks again :-)

 

jytylr: On November 14, 2008 7:19 PM said:

This was helpful for me as well. Thank you.

 

Pat Tormey: On November 18, 2008 6:48 AM said:

Thanks Terminator!

Pat

 

marcos2009: On January 6, 2009 8:42 PM said:

hi i'll really need hel with this.... i'm working in a vb.net project and and i'm programming tha validation with the error provider.... but when i put Me.ValidateChildren() in a botton it doesn't work as i want

this is my cod:

If Me.ValidateChildren = True Then

           MessageBox.Show("Not valid information ")

       Else

           Dim conexion As New SqlConnection("Data Source=SERVER\SQLEXPRESS; Initial Catalog=Promotions; Integrated Security=SSPI")

           Dim sql As New SqlCommand("insert into cargo values('" & Me.TextBox3.Text & "', '" & Me.TextBox4.Text & "')", conexion)

           conexion.Open()

           sql.ExecuteNonQuery()

           conexion.Close()

           fill_cargo()

           Me.TextBox3.Enabled = False

           Me.TextBox4.Enabled = False

       End If

and doesn't make the conection and information is right

I'm sorry about my english but i'm learning english too

 



Featured Item