Simplifying item selection problem

Discussion in 'ASP .Net Web Controls' started by Ted, Dec 20, 2006.

  1. Ted

    Ted Guest

    In this problem, I could use a brain dead, brute force, solution and
    just populate a dropdownlist from a lookup table. This is anything but
    user friendly, though, since the lookup table has almost 10,000 items.

    What I want to do is create a search form and use the item selected in
    that form to populate a cell on a data entry grid on the main form.
    The search form would contain an edit box into which the user sets a
    value, and a list box that is populated using the obvious SQL SELECT
    statement with a WHERE clause using the LIKE keyword. In other words,
    using a food analogy, the string entered (bean) would, when passed as
    the parameter value for the SELECT statement, return a list of items
    such as "Beans, baked", "Beans, green, frozen", "Beans, green, fresh",
    "Beans, yellow, frozen", "Beans, kidney, canned", "Beans, black,
    canned", &c.

    The question is, in an ASP.NET2 or ASP.NET3 form, how would I get the
    value selected in the list box on the search form into a cell on the
    grid on the first form? This gets a little complicated in that the
    third column needs to be populated using a dropdownlist that is
    populated using two parameters: the value in the first column and the
    value in a user preference dropdownlist. I haven't completely figured
    this out either, but one thing at a time.

    Is there a simpler way to do this? The requirement, again using the
    food analogy, is to allow the user to select foods to be added to the
    grid with the constraint that only those foods in the lookup table are
    permitted, and to protect the user from typos. The secondary
    requirement is that the last column represents units of measurement, so
    if the food is measured by volume, only volume units are present in the
    dropdownlist, while if it is measured by weight, only weight units are
    present, and if the user has selected metric units only metric units
    are available while if he has selected imperial units, only imperial
    units are available for selection.

    Thanks,

    Ted
    Ted, Dec 20, 2006
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Shawn
    Replies:
    2
    Views:
    719
    Rob Dekker
    Feb 27, 2006
  2. kartik

    simplifying use of properties

    kartik, Nov 3, 2004, in forum: Java
    Replies:
    23
    Views:
    773
    Stefan Schulz
    Nov 10, 2004
  3. Robert

    Simplifying HTML code

    Robert, Nov 30, 2004, in forum: HTML
    Replies:
    7
    Views:
    513
    Jim Michaels
    Feb 1, 2006
  4. Simplifying imports?

    , Sep 13, 2005, in forum: Python
    Replies:
    9
    Views:
    338
    George Sakkis
    Sep 14, 2005
  5. Replies:
    8
    Views:
    326
    Dave Thompson
    May 22, 2006
Loading...

Share This Page