473,387 Members | 1,882 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,387 software developers and data experts.

Validation questions...

Ok, I have been looking all over fro answers to these two questions and
can't seem to locate anything... I am still looking but figured that I would
drop a query here also....

1) The ErrorProvider control does not seem to offer any way that I can
check the control once to see if it has ANY errors registered for any of the
controls on my form. I have several controls that make use of the
ErrorProvider control and would love to simply do the following form my
forms same button:

If (errProvider.Errors > 0 ) Then
'Stop the save here

Else
'Continue saving the data here

End IF

But I cannot seem to do this. I seem to have to loop through the GetError
method passing in each control as I loop and see if the Length property is >
0. I then increment a counter and then when I am done I check the counter
to see if it is > 0, if it is I stop the save. Seems like a bit more work on
my part. I can't believe that the ErrorProvider doe snot have a simple
Errors collection that I can get a count on, or even an overloaded GetError
method that simply checks for the existence of ANY error...

2) Is it me or does using the Validating event still not work just right?
It seems to require that the user always move off the control explicitly
before it fires. I am not 100% sure if what I am seeing is just something in
my code or something wrong in the forms system (VB6 also has similar issues
if I remember correctly). For example, if I have three text boxes and a save
button, and I fill the data into all three boxes then from the third I just
click onto the save button I don't think I am seeing the third text boxes
validating event firing.
Jul 21 '05 #1
1 1384
Ray,

A very complete message again, to give some answers about it and not inline,
because that can become confusing in my opinion.

You can make one event for all your validating of your textboxes by adding
the handler dynamicly to that event. When you want a sample, I can make
that, it is very simple and there are more methods to do, so tell than if it
are all textboxes or only a selection.

The validating event fires in a sequence wherein is also the lostfocus
event. You can search on MSDN for that sequence for it, while there are two
sequences, dependable which control starts the sequence.

I hope this helps something?

Cor
Jul 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: r0adhog | last post by:
First off wanted to that all that replied to my previous questions, you were much help. Had a couple of general questions. Why has everyone suggested not using VB Script on the Client Side? ...
41
by: Gérard Talbot | last post by:
Cross-posted to: comp.infosystems.www.authoring.html and alt.html Followup-to: comp.infosystems.www.authoring.html 1- One day, I stumbled across a website that offers to validate webpages. What...
7
by: A.M | last post by:
Hi, I have a validation control in my page that upon any invalid data, it disables all buttons in the page. basicly i don't have any postback in the page if the validator finds any error. How...
5
by: M | last post by:
Hi, it's possible to append a custom action to a client-side verification of a validation control ? I have a validator summary control that shows (automatically) a message box if the validation...
5
by: Lloyd Dupont | last post by:
On my page the user is ask to set of question. Say there I have 2 controls like that == pseudo-C#-code for my control == class MyControl : CompositeControl { TextBox text; LinkButton button ...
9
by: julie.siebel | last post by:
Hello all! As embarrassing as it is to admit this, I've been designing db driven websites using javascript and vbscript for about 6-7 years now, and I am *horrible* at form validation. To be...
1
by: Rajani | last post by:
Hi, I have designed a form which process database Insert, edit and Delete(datagrid). I input userid,password and privilege in textboxes which has validation controls to verify data keyed in....
27
by: Chris | last post by:
Hi, I have a form for uploading documents and inserting the data into a mysql db. I would like to validate the form. I have tried a couple of Javascript form validation functions, but it...
2
by: moondaddy | last post by:
How can I have a page with 2 different groups of controls (where each group of controls contain textboxes, validation controls and a submit button) and each group operate independently? for...
8
by: Bryan | last post by:
I want my business objects to be able to do this: class Person(base): def __init__(self): self.name = None @base.validator def validate_name(self): if not self.name: return
0
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,...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
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...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.