UI Design, incase of numerous situations

Posted by The King on Stack Overflow See other posts from Stack Overflow or by The King
Published on 2010-06-07T17:06:37Z Indexed on 2010/06/08 1:42 UTC
Read the original article Hit count: 303

Filed under:
|
|
|
|

Hi... I'm creating a web form, where in there are around 12-15 Input Fields...

You can have a look at the screen here and here

The request is such that depending on the data the user selects in the Gridview and the DropDown list, the appropriate Textboxes and CheckBoxes needs to be displayed.

Some times the conditions are very direct, like when the DDL value is "ABC", get only paid amount from the user.

Sometime they are so complex like... IF DDL is "DEF" and Selected GPMS value is between 1000-2000, calculate the values of allowed, paid etc (using some formula) and the focus should be directed to Page No Field, leaving the other fields open incase user wants to edit... There are around 10-15 conditions like this.

As this was done through agile, conditions were being added as and when, and wherever it feels appropriate (DDL on change Event, GridView on selecting change event etc... etc..) After completion, now I see the code has become a big chuck, is growing unmanageably...

Now, I'm planning to clear this... From you experience, what you think is the best way to handle this. There is a possibility to add more conditions like this in future...

Please let me know, incase you need more information. I'm currently developing this app in C# .Net WindowsForms

Edit: Currently there are only three items (The Datagrid, the DDL, the OverrideAmt CheckBox) that change the way other fields behave...

Almost all of the conditions will fall between the two situations I mentioned... Mostly they belong to "Enabling/Disabling".. "Setting of Values"... and "Changing Focus" or any combination of these.

© Stack Overflow or respective owner

Related posts about c#

Related posts about .NET