Disabling most of the controls when pressing a button

G

G. Tarazi

A simple, simple, real world scenario.



A form with a lot of controls and 10+ buttons, some of them, if pressed, will require freezing all the controls in the form, except 2 text boxes and 2 buttons for a decision.



Then once the decision is taken, the rest of the controls will unfreeze



A scenario that will happen every ware, but how can it be done in InfoPath?



1- Add conditional formatting to all controls to disable them ((when possible), or make them read only (when not possible), or what so ever) when a field in the schema changes (this field is the control field, hidden).

2- Change the value of this field in order for the controls to freeze and unfreeze.



Nice idea when you do a customer / order sample with 10 text boxes, but have any one tried to implement that to a form with 500+ controls?



Currently that stupid form requires 30 to 50 seconds to open, because InfoPath is very fast (but that is another problem), now it may take perhaps twice that time after all the additional conditional formatting.



And of course another unnecessary layer of stupid complexity.



And of course these combo boxes are still losing there conditional formatting, when the schema is re imported even if there was a very simple modification.



Does it seams stupid? If it was .NET windows forms, just a simple loop to all controls and the operation is done, but since someone in the InfoPath team decided that all controls cannot be accessed directly from the C# code, and since my project is in a stage that it is too late to move back to Windows Forms, or JAVA, there is nothing but to try to find a new workaround.



Never mind, please the next time you are selling the software, add the maximum limits of that software, like InfoPath (maximum limits, 1 page form (2 pages slow), 50 controls max, do not use complex conditional formatting, keep the schema inside, and save as xml (forget the database), and be careful when adding and deleting controls because the form will crash)



Because the next time, when I am signing to develop a project, I will tell my client, warning, .... or actually I will tell him nothing, I just don't believe any of your advertisements anymore, next time I am doing my own tests, I was always wondering why languages such as java or other languages are still out there, and I am coming to conclusion that I am not the first one burn :)
 

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

Top