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

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 1594
CT
For Each myControl As Control In Me.Controls
myControl.Enabled = False
Next
--
Carsten Thomsen
Enterprise Development with VS .NET, UML, AND MSF
http://www.apress.com/book/bookDisplay.html?bID=105

"Steve" <St***@discussions.microsoft.com> wrote in message
news:10**********************************@microsof t.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.Enabled = False
Next
--
Carsten Thomsen
Enterprise Development with VS .NET, UML, AND MSF
http://www.apress.com/book/bookDisplay.html?bID=105

"Steve" <St***@discussions.microsoft.com> wrote in message
news:10**********************************@microsof t.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
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...
1
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...
0
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...
2
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...
10
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 =...
4
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...
1
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...
3
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...
8
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...
2
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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...
0
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...

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.