Click here to Skip to main content
13,046,457 members (71,157 online)
Rate this:
Please Sign up or sign in to vote.
See more:
in windows forms i have two comboboxes first is for mobile manufacturer i.e nokia,samsung,sony and second combobox is for company's model like nokia pure view, samsung s3, htc one,
i want to change the model number as per the changes will happen to the first column, i means when user select nokia in the combobox1 then the combobox2 will show the company's model like nokia pure view, 6600,7610 etc etc from the next combobox, i dont want to save the model no. in the combobox's list i want to use the database connectivity with combobox so that i can update the new new upcoming model in the column then it will be easy so by reviewing i can bind the column with the combobox but how can i change the column when selection is change in combobox1
i prieously used the selection change event of the combobox with the strings saving all the models, but it is too hilarious that if i want to update the model i want to edit the whole software. so i decided it should be in a column so that i can update that but i dont know to logic how to change
sorry for my bad explanation i am weak in english
i have used this before
if ("samsung" == comboBox1.SelectedItem.ToString())
           else if ("apple" == comboBox1.SelectedItem.ToString())
Posted 30-Dec-12 1:28am
Updated 30-Dec-12 4:51am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Here is a detailed guide: Cascading DropDownLists with jQuery and ASP.NET[^]

I've written a bit about databinding here: Depends4Net - Part 2[^]

Best regards
Espen Harlinn
sariqkhan 30-Dec-12 9:03am
i am using windows form
Espen Harlinn 30-Dec-12 9:07am
Then the answer is even easier, just use a BindingSource to provide the elements -

Settng them up is similar to:
sariqkhan 30-Dec-12 10:51am
can you tell me verbally the link i cant understand, i am a newbie
Espen Harlinn 30-Dec-12 10:54am
Try reading up on Windows Forms Data Binding:

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.170713.1 | Last Updated 30 Dec 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100