Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 856773
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T08:17:24+00:00 2026-05-15T08:17:24+00:00

I’m creating a web form, where in there are around 12-15 Input Fields… You

  • 0

I’m creating a web form, where in there are around 12-15 Input Fields…

You can have a look at the screen here http://img9.imageshack.us/img9/2951/image001um.jpg and here http://www.freeimagehosting.net/uploads/f9f4491598.jpg

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T08:17:25+00:00Added an answer on May 15, 2026 at 8:17 am

    Minimal overhead


    Write a single-procedure that contains all the evaluation logic.
    i.e. evaluate all the individual states and show/hide the appropriate controls from within the procedure.

    Now call this procedure whenever there is any change event
    that requires you to re-evaluate whether to show/hide any controls.

    Do NOT show/hide any controls from outside this procedure.

    Any additional validation-checks in future can always be easily incorporated
    by adding the additional checks inside this procedure.

    To improve upon the performance of this procedure:
    [1] Add a parameter (int/string) to the procedure.
    [2] Pass a different value in this parameter when calling from different events of different objects.
    [3] In the procedure, from on the value of the parameter, you can determine what object(& what event) has triggered this re-evaluation.

    Thus You can evaluate only those conditions that could possibly depend on this particular change in this particular object. This way the re-evaluation overhead is reduced to the bare-minimum.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
Seemingly simple, but I cannot find anything relevant on the web. What is the
Does anyone know how can I replace this 2 symbol below from the string
this is what i have right now Drawing an RSS feed into the php,
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I have a French site that I want to parse, but am running into
I have a bunch of posts stored in text files formatted in yaml/textile (from
I am trying to loop through a bunch of documents I have to put

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.