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

Check Box Change Event

Dan
All,

I have a form with a check box on it for which I have
implemented a CheckedChange event. The form is the front
end of a complex data entry system. When I load the form I
check for previously entered data and load that into the
form. If a certain value exists then I set the CheckBox
Checked property to true. The problem that I have is that,
when the form Loads the CheckedChange event fires and that
code executes. I don't want that to happen. How do I get
around that? What should I be doing in order to control
that event?

Thanks for the help!

Dan
Nov 15 '05 #1
1 4102
The easiest way probably is to set a flag for yourself so
that your CheckChanged event handler knows whether it
should process the event.

private bool loading;

private void LoadForm(){
loading = true;
//Code to load the form
loading = false;
}

Then in your event handler...

private void checkBox1_CheckChanged(object sender,
EventArgs e){
if(loading){ return; }
//Process event
}
Charlie
-----Original Message-----
All,

I have a form with a check box on it for which I have
implemented a CheckedChange event. The form is the front
end of a complex data entry system. When I load the form Icheck for previously entered data and load that into the
form. If a certain value exists then I set the CheckBox
Checked property to true. The problem that I have is that,when the form Loads the CheckedChange event fires and thatcode executes. I don't want that to happen. How do I get
around that? What should I be doing in order to control
that event?

Thanks for the help!

Dan
.

Nov 15 '05 #2

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

Similar topics

6
by: LRW | last post by:
I have no idea if this is more a PHP question or Javascript question, because my problem hinges equally on both. I have a PHP script that queries a database and creates a list of rows for each...
2
by: Ben | last post by:
My current project requires me to create part of a form that is created on the fly. The project consists a list of entries to an event. The name and address and such is easy. The design is detup so...
7
by: Tony Johnson | last post by:
Can you make a check box very big? It seems like when you drag it bigger the little check is still the same size. Thank you, *** Sent via Developersdex http://www.developersdex.com ***...
4
by: welie | last post by:
I have a problem canceling a check box update when placing a check in it. Checkbox is not bound. Here is what happens. User clicks a check box. In the BeforeUpdate method of the control, if...
4
by: Jiho Han | last post by:
What is the best way to check whether the page is simply a postback or the form has been submit with the intention of doing something? In the olden days, I used to check for a form field name...
1
by: sianan | last post by:
I tried to use the following example, to add a checkbox column to a DataGrid in an ASP.NET application: http://www.codeproject.com/aspnet/datagridcheckbox.asp For some reason, I simply CAN'T get...
5
by: mabond | last post by:
Hi Can't believe I've not been able to find the answer to this in the on-line help. I have a CheckedListBox which, via a timer control, is populated with the names of files in a network...
0
by: seanwalsh | last post by:
Hi I'm new to ASP.NET (from classic ASP) and wasn't aware of the Forms Authentication security when I started working on a website. So I built a login page that stores a CustomUser object in the...
2
by: Ken Fine | last post by:
I want to add the security question and answer security feature to the ChangePassword control. I am aware that this functionality is built into the PasswordRecovery tool. I have implemented the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.