M
markgordon_007
This should be so simple but I can not figure it out hopefully some
one can point me in the right direction...
Visual Studio 2008 and c# and winforms ....
I'm trying to create a textbox class and I want to write some generic
checks in the validate or validating method such a unique and empty
check... The control shows up in the toolbox and I can drop in on my
winforms and bind a field in a dataset to it just fine ...
The problem is when I leave the field I can not get the validate or
validating to fire when I leave the field. I set the CauseValidation
to true .... Below is a sample of the textbox class that I'm dropping
on the form ...
Any Thoughts what is going on ?
Thanks
Mark
public class BaseTextBox : TextBox
{
private void BaseTextBox_Validate()
{
MessageBox.Show("Validate");
}
private void BaseTextBox_Validating(object sender,
CancelEventArgs e)
{
bool IsValid = true
MessageBox.show("In Validating");
return IsValid;
}
}
one can point me in the right direction...
Visual Studio 2008 and c# and winforms ....
I'm trying to create a textbox class and I want to write some generic
checks in the validate or validating method such a unique and empty
check... The control shows up in the toolbox and I can drop in on my
winforms and bind a field in a dataset to it just fine ...
The problem is when I leave the field I can not get the validate or
validating to fire when I leave the field. I set the CauseValidation
to true .... Below is a sample of the textbox class that I'm dropping
on the form ...
Any Thoughts what is going on ?
Thanks
Mark
public class BaseTextBox : TextBox
{
private void BaseTextBox_Validate()
{
MessageBox.Show("Validate");
}
private void BaseTextBox_Validating(object sender,
CancelEventArgs e)
{
bool IsValid = true
MessageBox.show("In Validating");
return IsValid;
}
}