After a blog post, make a small change to the interface, do 4 combobox, forming a linkage between the window:
The interface is as follows:
Select a condition in the ComboBox, click Query to get the data
First connect to the database, get the data into the first ComboBox, the code in the previous post, there is no more narration, the implementation of the first and second ComboBox linkage:
Open the ComboBox1 selectedindexchanged () function, and when the value of the ComboBox changes, the value of the ComboBox changes, The linkage of the same Combobox3 is written in the SelectedIndexChanged () of Combobox2.
Because of the need to connect to the database, so the linkage occurred to write a number of dictionary functions, get to the ComboBox text value when the Int value code is returned. According to the code code to write SQL statements, the details are too lengthy is not posted in the blog, the final effect:
C # ComboBox Linkage