473,654 Members | 3,280 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Cancel Click Of Check Box

Hi i've just started using check boxes on my form.

When the check box is clicked i want to test a condition is met (in my
database i'm only allowing certain users to click the check box to void
a transaction of a payment) if this condition is not met then the check
box needs to be unchecked if it wasnt check initially or remain checked
if it was already checked by an authorised user.

Do i have to write an IF statement to do this and then say
chkVoid.Value = True etc.. Or is there a way to just cancel the click
with just one line of code?
I am currently calling this from the On Click event. Is this correct?

Many thanks in advance!

Nov 13 '05 #1
1 3628
Found the answer its cancel= true

Cheers

Nov 13 '05 #2

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

Similar topics

1
2092
by: Gopal Prabhakaran | last post by:
Dear Guys I developed a Win form application using C#. In my application, I used Login form to enter into application. In this login form I used three buttons( OK, Close and Cancel). The OK button call the web service and check the login credentails and then delivers the proper required data shown in the main screen back to the UI. Suppose I click the OK button, now I want to cancel the operation, so that I want to click the Cancel...
3
5567
by: Mvk | last post by:
Hi; I have a simple aspx form. I have put a textbox and 2 buttons on it. The textbox is linked to a requiredfieldvalidator. Click on button 1 (= ok button) = Store value in textbox in database. Click on button 2 (= cancel button) = Redirect with Response.Redirect("AnotherPage.aspx") Now I have the following problem. When I click on the "Cancel"-button the
1
2101
by: dave | last post by:
I have a html table and mutliple rows. On each row i put an onclick event that opesn a modal window and prompts the user for some information. I want this modal window to show when the user clicks anything on that row. I have a few checkboxes in the row cells. The click event first fires on the checkbox and then the row (opening the modal window after the checkbox is checked). How can I force the modal window to open first and...
2
635
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How do I change the confirm box to say yes/no or default to cancel? ----------------------------------------------------------------------- The buttons on a confirm box cannot be changed, nor can you specify a default button. However, you should be able to change the question so that "OK" is suitable as the default. e.g. change "We will now buy ourselves...
3
11929
by: Gallarpri | last post by:
Hi, I'm making a dialog form with a textbox and 2 buttons: OK and Cancel. I want when I click on OK button, the program check the textbox, and if there is any error in the text introduced there, then it shows a MessageBox and cancel the click event, so the dialog form won't close. How can I cancel the click event on a button? I have looked at "EventArgs e", but it hasnt any property to cancel the vent.
1
1592
by: Ganesh | last post by:
Hi There, I've a validation control in my page, In some cases i don't want to check the validation like when users click cancel, i'l take the page to home page. But it checks always validation. How can i ignore the validation when i click cancel Thanks Ganesh
2
20988
by: =?Utf-8?B?UmljaA==?= | last post by:
Is there a cancel argument for cancelling if you want to check or uncheck a checkbox? In the checkChanged event of a checkbox I ask the user if they are sure they want to check/uncheck something. If No, I want to cancel the check or uncheck and cancel the click event. Right now I have a form level boolean checkvar that I set based on the user's response. If No then when entering the click event I don't perform various actions. Is...
6
2428
by: =?Utf-8?B?V2hpc2tleVJvbWVv?= | last post by:
I read the 4 or 5 threads on this Subject and it seems my javasript should work but it doesn't. In the designer, the onClientClick is set to: CheckForSave(this). This works in .Net 1.1 but not 2.0. The User is presented with an OK or Cancel confirmation window. However, pressing Cancel does not result in the button's post back being cancelled. In the meantime, I'll try the other suggested methods. Here is my javscript: function...
5
9862
by: jmarcrum | last post by:
Hey everybody! I've created 2 buttons that I've placed on all my forms: a Save button & a Cancel button. The cancel button I have a question about. I used the wizard to create the button and I selected the Record Operations/Undo Record option. I edited the vba code to have the button also close the form after it undoes any changes. Here is the actual code for the OnClick event for the cancel button: Private Sub cmdCancel_Click()...
0
8376
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
8815
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...
1
8489
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
8594
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
5622
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
4149
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
4294
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1916
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1596
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.