473,657 Members | 2,358 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Disable and Enable objects on mass???


Using Visual Studio .NET 2003 with C#

I have a screen which is used to View, and Update a load of fields. The
fields are displayed in TextBox objects and are databound to a typed dataset.
I have a toolbar with Add Update and Save buttons on it. When the user goes
into this screen I want it view only, so all the text boxes are disabled.
When they click the update button i want to rip through and enable all these
objects. How can I do this? Can I foreach through them some how? store
them in an ArrayList somehow?

Thanks

Steve
Nov 22 '05 #1
2 1606
CT
For Each myControl As Control In Me.Controls
myControl.Enabl ed = False
Next
--
Carsten Thomsen
Enterprise Development with VS .NET, UML, AND MSF
http://www.apress.com/book/bookDisplay.html?bID=105

"Steve" <St***@discussi ons.microsoft.c om> wrote in message
news:10******** *************** ***********@mic rosoft.com...

Using Visual Studio .NET 2003 with C#

I have a screen which is used to View, and Update a load of fields. The
fields are displayed in TextBox objects and are databound to a typed
dataset.
I have a toolbar with Add Update and Save buttons on it. When the user
goes
into this screen I want it view only, so all the text boxes are disabled.
When they click the update button i want to rip through and enable all
these
objects. How can I do this? Can I foreach through them some how? store
them in an ArrayList somehow?

Thanks

Steve

Nov 22 '05 #2
CT
For Each myControl As Control In Me.Controls
myControl.Enabl ed = False
Next
--
Carsten Thomsen
Enterprise Development with VS .NET, UML, AND MSF
http://www.apress.com/book/bookDisplay.html?bID=105

"Steve" <St***@discussi ons.microsoft.c om> wrote in message
news:10******** *************** ***********@mic rosoft.com...

Using Visual Studio .NET 2003 with C#

I have a screen which is used to View, and Update a load of fields. The
fields are displayed in TextBox objects and are databound to a typed
dataset.
I have a toolbar with Add Update and Save buttons on it. When the user
goes
into this screen I want it view only, so all the text boxes are disabled.
When they click the update button i want to rip through and enable all
these
objects. How can I do this? Can I foreach through them some how? store
them in an ArrayList somehow?

Thanks

Steve

Nov 22 '05 #3

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

Similar topics

3
15948
by: Alphonse Giambrone | last post by:
I am trying to enable/disable a requiredfieldvalidator on the client side and am generating an error. I had found some documentation on validation which states that I should be able to enable/disable validators on the client side. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/aspplusvalid.asp According to it and the little other info I was able to find, the way to accomplish what I want it to call...
1
306
by: Steve | last post by:
Using Visual Studio .NET 2003 with C# I have a screen which is used to View, and Update a load of fields. The fields are displayed in TextBox objects and are databound to a typed dataset. I have a toolbar with Add Update and Save buttons on it. When the user goes into this screen I want it view only, so all the text boxes are disabled. When they click the update button i want to rip through and enable all these objects. How can I do...
0
2409
by: talal | last post by:
How to check whether javascript is enable or disable in client browser. Remeber i can check wheter browser client support javascript with BrowserCapability class. But what if the client has disable from security setting in a browser. Tell me is there any class like browserCapability in asp.net to check wheter javascript is enable or disable. Please dont tell me the html way or do some javascript because i have to apply this code into...
2
2531
by: PamelaDV | last post by:
I am wondering if there is a way to disable the "X" used to close the Access application window? I know how to disable it for individual forms, but I would like to disable it for the application in general and force users to use a button on the switchboard to close (because I run important code on the close of the database from that button). Any ideas are always appreciated. Thanks!
10
8077
by: Gary Jefferson | last post by:
Suppose I have 3 modules that belong to a project, 'A', 'A.a' and 'B', and each module has its own logger, created with: module1logger = logging.getLogger('project.A') and module2logger = logging.getLogger('project.A.a') and
4
14213
by: Phoe6 | last post by:
Hi all, I am trying to disable the NIC card (and other cards) enabled in my machine to test diagnostics on that card. I am trying to disable it programmatic using python. I checked python wmi and i could not find ways to disable/enable, (listing is however, possible). Where should I look for to enable/disable devices in python. Thanks,
1
12267
by: Birky | last post by:
I have a form (Custom_Code) that has a sub form (Support_Groups_Form) associated to it. I have a need to enable and disable the fields depending on user selection but I am having trouble controlling the sub form objects. I am using the Me.Project_Manager.Enabled = True Code to control the main forms objects but again I have no clue as to how to control the sub forms objects. If the sub forms name is “Support_Groups_Form” and the...
3
11644
by: Pietro | last post by:
Hi all, First of all I'd like to thank you very very much ,as finally after many years of searching,I could find a code to disable/enable the shift key,but actually i cannot use the code as I'm very new to VBA,i tried to follow the instructions reported in the code,but i got no result,i still can use the shift key,can you explain in details how to use it correctly to enable/disable users from pressing shift key to view database windw?,the...
8
17218
by: sebouh181 | last post by:
I am writing to registry using javascript. var wsh = new ActiveXObject("WScript.Shell"); var key = "HKLM\\Software\\Neos\\2.0\\LightMode\\my-script"; wsh.RegWrite (key, 1999, "REG_SZ"); when i run this javascript code in my HTML page the following warning message appears An ActiveX control might be unsafe to interact with other parts of the page. Do you want to allow this interaction? I want to remove this message.
2
4366
by: Naushad | last post by:
Hi all, I am using the countinous form. I want to Enable/Disable the some fields for perticular records as per the following condition when open the form. I have written this code in "On Current Event". I go on the perticular record its enable/dosable the following field for all records. I have tried this code in "On Open Even" but there is no effect. Please help me to solve this problem.
0
8411
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
8323
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8513
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
8613
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
5638
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
4173
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...
1
2740
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
2
1969
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1732
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.