views:

585

answers:

2

Anyone know of a control for asp.net that can achieve this either server or ajax.

I have a hierarchy of school, division and programme area. Unfortunately this hierarchy has complexities such that a programme area can appear in more than one school.

As it is for reporting I would like to give the end user options across each dropdown of the hierarchy for ANY/ALL. So if a school was selected you could still select any division within that school and an ANY/ALL option and then then programme area list would be filtered based on school the school selected and ANY/ALL divisions.

I hope that makes sense, any questions I will make edits.

EDIT: I solved this I realized, I had missed the obvious, I had put in my original solution of 3 separate drop downs separate sql queries requiring the inputs of the above dropdowns in the hierarchy. I realised if I had my any as the wildcard % (sqlserver one or more characters) and changed the equals to like I would achieve the desired effect.

It does post back but it's not really an issue it's a very quick set of sql queries.

A: 

the options that show in the drop-down-list are controlled by the XML backing the control. If you include all possible values under the 'ANY' selectbox they will show in the control.

The real answer should be how much data and how many possible combinations will there be? If the number is minimal and can be predicted you should make that XML file.

It it is a large number, or not easily predicted and what you're really looking for is an "advanced search" type functionality it should be very easy to do using the selectbox control.

Kyle West
+1  A: 

The ASP.NET AJAX Control Toolkit has a cascading drop down list that uses a web service interface to determine what data will populate the next drop down list of data. I could easily see you leveraging this control so that your web service either returns a specialized subset if a specific item is selected or returns the full set of options if the ANY/ALL item is selected.

Is this along the lines of what you seek?

Dillie-O