Multiple DropDown list on a form

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • tjalle

    Multiple DropDown list on a form

    Hello,

    I have 5 different Dropdown lists on a form. There is no need to select an
    item in every one , at least one but could be all 5. I have a Submit buttom
    - how do I grab all all SelectedIndexCh anged? Any ideas ?-
    Tjalle
  • Mohamoss

    #2
    RE: Multiple DropDown list on a form

    Hi Tjalle
    I don't know if I got you correct, but if it doesn't matter which
    one was clicked ( one or all ) , then you can have one handler function
    for all the SelectedIndexCh anged of the five of them .In this handler you
    get the new index of all of them ( if one didn't change you will get the
    old already existing one which should be no problem) you get all these
    values and what ever logic you do on them . Now that you have that one
    hander function , you can associate it with the delegate of the event of
    each list. This way you will have all the five events handled with the same
    function. Hope this helps
    Mohamed Mahfouz
    MEA Developer Support Center
    ITworx on behalf of Microsoft EMEA GTSC

    Comment

    • Chris Ballard

      #3
      RE: Multiple DropDown list on a form

      Tjalle,

      It is not clear what you are trying to do. You mention forms in your post,
      but DropDownList is a web component - are you using Windows Forms or ASP.NET?

      Either way, I would suggest that you use the same SelectedIndexCh anged
      handler for all the dropdownlists (or comboboxes). For ASP.NET make sure you
      set AutoPostBack to true. In this handler you can check the selected index
      for each of the controls and enable/disable the Submit button appropriately.

      HTH,
      Chris.

      "tjalle" wrote:
      [color=blue]
      > Hello,
      >
      > I have 5 different Dropdown lists on a form. There is no need to select an
      > item in every one , at least one but could be all 5. I have a Submit buttom
      > - how do I grab all all SelectedIndexCh anged? Any ideas ?-
      > Tjalle[/color]

      Comment

      Working...