Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Dropdown list problem

Dropdown list problem

Scheduled Pinned Locked Moved ASP.NET
help
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    Imran Khan Pathan
    wrote on last edited by
    #1

    Hi friends I have two dropdown list and one check box both dropdown have same records when i select item in dropdownlist and then i check checkbox,on checkbox event i want to get same selected item in other dropdowlist. my code is DD2.Items(DD2.SelectedIndex).Text = Me.DD1.SelectedItem.Text Pathan

    R I 2 Replies Last reply
    0
    • I Imran Khan Pathan

      Hi friends I have two dropdown list and one check box both dropdown have same records when i select item in dropdownlist and then i check checkbox,on checkbox event i want to get same selected item in other dropdowlist. my code is DD2.Items(DD2.SelectedIndex).Text = Me.DD1.SelectedItem.Text Pathan

      R Offline
      R Offline
      RaviJJain
      wrote on last edited by
      #2

      DD2.Items.FindByText(DD1.SelectedItem.Text).Selected = True :-O

      I 1 Reply Last reply
      0
      • R RaviJJain

        DD2.Items.FindByText(DD1.SelectedItem.Text).Selected = True :-O

        I Offline
        I Offline
        Imran Khan Pathan
        wrote on last edited by
        #3

        Hi I want to do it in javascript. Thanks 4 ur reply pathan

        1 Reply Last reply
        0
        • I Imran Khan Pathan

          Hi friends I have two dropdown list and one check box both dropdown have same records when i select item in dropdownlist and then i check checkbox,on checkbox event i want to get same selected item in other dropdowlist. my code is DD2.Items(DD2.SelectedIndex).Text = Me.DD1.SelectedItem.Text Pathan

          I Offline
          I Offline
          iamrashida83
          wrote on last edited by
          #4

          try this var DD1List = document.getElementById('DD1'); var DD2List = document.getElementById('DD2'); var index = DD1.selectedIndex; DD2.options[index].selected=true;

          Regards, Rashida Jabeen http://www.akaas.net[^]

          I 1 Reply Last reply
          0
          • I iamrashida83

            try this var DD1List = document.getElementById('DD1'); var DD2List = document.getElementById('DD2'); var index = DD1.selectedIndex; DD2.options[index].selected=true;

            Regards, Rashida Jabeen http://www.akaas.net[^]

            I Offline
            I Offline
            Imran Khan Pathan
            wrote on last edited by
            #5

            Hi rashida Thanks for ur reply its work fine now i want to remove that item when i uncheck checkbox and selected index should be -1 of 2nd dropdownlist. Pathan

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups