473,795 Members | 3,122 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to trigger the CheckBox1_Check edChanged event by change the checked value by code?

Hi

If I change the checked value of the checkbox by code, I can not trigger the
CheckedChanged event of a checkbox control. Is there any way to implement it?

Thank you very much!

David

Nov 18 '05 #1
3 6167
You have to make sure the checkbox "AutoPostBa ck" property is True.
"David" <ed******@gmail .com> wrote in message news:%2******** ********@tk2msf tngp13.phx.gbl. ..
Hi

If I change the checked value of the checkbox by code, I can not trigger the
CheckedChanged event of a checkbox control. Is there any way to implement it?

Thank you very much!

David

Nov 18 '05 #2
Thanks,
but I don't think you understood my question. I want trigger the event when I change the value by code not user click operation.
Sure I have set autopostback to true, other the event would not fire even I use the mouse to click the checkbox.

David
"news.microsoft .com" <ne**@microsoft .com> wrote in message news:OI******** ******@TK2MSFTN GP15.phx.gbl...
You have to make sure the checkbox "AutoPostBa ck" property is True.
"David" <ed******@gmail .com> wrote in message news:%2******** ********@tk2msf tngp13.phx.gbl. ..
Hi

If I change the checked value of the checkbox by code, I can not trigger the
CheckedChanged event of a checkbox control. Is there any way to implement it?

Thank you very much!

David

Nov 18 '05 #3
I think what you can do is write a new function and move the code in CheckedChanged event into the new function.
Call this function when you change the value of the checkbox and in CheckedChanged event.

"David" <ed******@gmail .com> wrote in message news:u2******** ******@TK2MSFTN GP09.phx.gbl...
Thanks,
but I don't think you understood my question. I want trigger the event when I change the value by code not user click operation.
Sure I have set autopostback to true, other the event would not fire even I use the mouse to click the checkbox.

David
"news.microsoft .com" <ne**@microsoft .com> wrote in message news:OI******** ******@TK2MSFTN GP15.phx.gbl...
You have to make sure the checkbox "AutoPostBa ck" property is True.
"David" <ed******@gmail .com> wrote in message news:%2******** ********@tk2msf tngp13.phx.gbl. ..
Hi

If I change the checked value of the checkbox by code, I can not trigger the
CheckedChanged event of a checkbox control. Is there any way to implement it?

Thank you very much!

David

Nov 19 '05 #4

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

Similar topics

2
4199
by: Trevor Fairchild | last post by:
I am trying to create a very minimal auditing system for a series of databases. I am in the process of writing Update triggers for 5 Tablse. I will write a trigger for each table-the trigger's function will be to INSERT a row into my MasterChanges table everytime ANY data is changed in each of the 5 tables. I have set up MasterChanges to capture the following: what Table the change was made in
2
17519
by: R. Rajesh Jeba Anbiah | last post by:
I have Googled a lot, but couldn't still find the answer... I could see, I can trigger the "click" event like: button_object.Click() But, I need to trigger the onChange() of select options. I couldn't find anything like: select_object.Change() More specifically, I have something like:
2
2660
by: ezra epstein | last post by:
Hi, I've got a table: <code language="SQL"> CREATE TABLE "common"."dynamic_enum" ( "pk_id" integer DEFAULT nextval('"common"."pw_seq"') , "enum_type" common.non_empty_name
3
7286
by: dave | last post by:
I have half a dozen web form radio buttons on a web form. Each of them is set to postback=true. However, if for instance radiobutton1 is already selected and the user selects it again, it performs a postback. I only want to do a postback if the value of the radiobutton is changed. What is the best method to accomplish this? thx dave
2
3978
by: Owin | last post by:
Hi all, I've created an User control. It's an extension of a textbox wich has some extra properties so that validation becomes a lot faster. The control wordks great if autopostback is on. When there's a value in the textbox, the (overridden) textchanged event fires and validation is performed. Now I want to turn off autopostback. So I want my contol only validate if the submit button is pressed. I've tried Page.Validate(), but It seems...
5
8723
by: Bob | last post by:
In a datagridview (vs2005, VB.net) I have two columns that are checkboxes. I need to check that only one of the two can be checked. Its not permissible to have the two selected to true, but they can both be false. I wrote code in the cellvalidating event as follows. Private Sub Datagrid1_CellValidating(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellValidatingEventArgs) Handles Datagrid1.CellValidating ...
5
2165
by: rn5a | last post by:
Consider the following user control which resides in Address.ascx: <script runat="server"> Public Property Address() As String Get Address = txtAddress.Text End Get Set(ByVal value As String) txtAddress.Text = value End Set
13
2423
by: Screaming Eagles 101 | last post by:
Hi, I have a solution containing two projects - main project with main form containing a statusstrip - second project containing a usercontrol. I have added the usercontrol to my main form, all works perfect... Can my usercontrol 'fire an event' which allows it to change the value(s) on the main form's statusstrip ?
1
7027
by: daonho | last post by:
I tried to use javascript to trigger up the button click function when user press enter key from the textbox. This function work fine with a single button click such has login page. However, if the page has multiple button such login page with a search function somewhere around, then it's not respond properly. I have attached a brief example of two text boxes and two button. When ever a key is press on textbox one, I want to trigger...
0
9672
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10439
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10215
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10165
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10001
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6783
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5437
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5563
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.