Disable and Enable objects on mass???

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
For Each myControl As Control In Me.Controls
myControl.Enabled = False
Next
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top