Skip to content

Windowsforms

Gopikrishna Medarametla

Asked Jul 23, 2014, 10:50 PM EDT2 answers
Share
LinkedInX
how add countries names to combobox and their respective states in another combobox in windowsforms
when india is select in country combobox  then india states are add to state combobox

2 Answers

Know the answer? Post it. Somebody with the same question will find it here.

  • 0
    I posted reply in other thread already. please refer and let me know if you've more questions

    twitter @sumitjolly
    0
  • 0
    Hi Gopi
    First create two table in sql like below given structure

    Country Table
    ID Name
    1 India
    2 Japan
       
       
       
     
    State Table    
    ID Name Country ID
    1 Odisha 1
    2 Maharastra 1
         
         
         


    Then query country table from sql and bind with your combobox itemsource, you want to display, then query state table by country id in the selected change event of country combbox  and bind into with another combobox itemsource

    Kindly mark as answer, if it helps you
    Thanks,
    Kailash
    0