473,320 Members | 1,859 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,320 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 1593
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: 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
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: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
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
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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.