Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

Multi-Filter wiht Ajax & onChange

$
0
0

We have and ASP.NET app using AJAX/javascript to update a form which contains three dropdown lists. Each of the lists are fed from different columns from a table. We are trying to have the content filtered whereby when I select 1 value in column A, columns B & C will automatically be filtering accordingly. Similarly, when selecting B, column C will be further filtered.

We were looking to create an "excel-like" filtering method, whereby a user can select any column (A/B/C) in any order, and the values will be automatically updated in the opposing two columns. Just like in Excel you can filter from within any column and all of the other columns are updated.

The problem we have is that since we are using the onChange javascript function attached to each dropdown, if we update the list values each time another column's value is selected, it will create a loop of changes ping-ponging from 1 list to another, to another, to another . . . ., since each time the values will change and it will create an infinite loop. Is there a way alternatively to only call an "onChange" function when a user selects a value in the list, and NOT when the list values are updated? Or possibly another idea?

Thanks,

Reuvy


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>