Click here to Skip to main content
15,900,973 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
i want to select a dropdown option and cause population of another combobox which is done onthe criteria of first selection.but both are from same table.

I have two tables.i want even second tables details which refer the first table to be displayed on the form..but i dont want to query again and again...


can i do the selection of comboxes in single query without using multiple queries..
Posted

1 solution

I suggest you look into using LINQ.

It allows you to manipulate the contents of the comboboxes (i.e, items in memory).

So, selection in first comboBox can be used to create LINQ query to populate second combobox, all using the same data array for input.

As an alternative perspective, load your initial data and manipulate it to fill all of your comboboxes, much like bringing a piece of your original data source into your application.


 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900