Resolved Multiple ListBox selection

kwhelchel

Well-known member
Joined
Feb 28, 2020
Messages
53
Programming Experience
Beginner
Hi there,
What I am attempting to do is this with in my project. Using 3 separate listboxs to present data to be selected and then a run button. the idea is this layout.

Listbox1 contains a list of rdlc reports that is created

Listbox2 will contain a list of filters that can be selected if needed

Listbox3 will reflect the filter variables that can be used.

will be using sql data for listbox3 variables

so I would select report from listbox1 then in listbox2 there would be a filter for dates. Listbox3 will reflect the dates available to be selected (one or multiple) then a button to execute this report.

I currently have listbox1 showing the reports and able to use the button to run it via a doubleclick on the button. This works perfect for what I want so far.
So I am new to this and been looking and trying things to make my listbox2 and 3.
looking for some suggestions or what terminology I need to look for what I need.

Thanks
 
Last edited:
ListBoxes have a events that fire when the selected item changes. You'll want to handle that event and populate the next listbox based on the item that was selected on the previous listbox.

Another choice is to go old school and use a wizard like UI. The idea with a wizard is typically only have 1 or 2 pieces of information entered on a page, and the user clicks the next button to let the program ask the next set of inputs, or show the final results. So in your case, you would have a list box per wizard page. Each time you enter a new wizard page, you use the input from the previous page to determine how to populate the controls on this new page.
 
Thank you that is what I should be needing, Now to get my listbox to when selecting an item with in it to pull up a sql table in listbox3
 
It will be exactly the same principle, except the event is setup on listbox2 and it should have code to populate listbox3.
 
Back
Top Bottom