Last post Nov 21, 2014 01:15 AM by Michelle Ge - MSFT
Nov 20, 2014 11:31 AM|chilluk|LINK
On the site I am working on currently there are a large number of products (70k) so filtering is essential. Currently we have filters that are driven from attributes that are linked to the product records (one product can have many attributes) - this is
OK but once you choose a filter within a section (Brand for example) the other choices in that section are lost to you, because the filters react to the filtered data.
On this UK site http://www.diy.com/rooms/garden-garage/garden-power-tools/lawnmowers/DIY823171.cat?pageSize=48 you can see what we would like to
achieve - a section of filters stays "open" allowing you to select multiple values from within, until you move on and further filter.
I am having issues trying to work out how to achieve this type of arrangement - I am building SQL statements on the fly based on the filters chosen, but I am struggling with the logic to include values from certain sections, when filters have already been
applied in others sections.
My (simplified) product attribute table structure is as follows :
On my site I display the filters like so :
Filter 1 (99 prods)
Filter 2 (10 prods)
Filter 1 (10 prods)
Filter 2 (99 prods)
Filter 1 (10 prods)
Filter 2 (49 prods)
Filter 2 (50 prods)
So if I select a filter from section 1, both filters remain in section 1, but the filters in the other 2 sections react to my selection. When I select a filter from another section it's OK for the filters in section 1 to revert to just those I selected previously
as I have finished addig a multi selection.
Anyone ever done anything like this? I'm hitting my head on my desk!! Thanks
Nov 21, 2014 01:15 AM|Michelle Ge - MSFT|LINK
So far as I known, you need to create a SelectedChanged event to every setion, as you select a value we will add the the selested value as parameters to filter the data in the selectedChanged event.
There is a document about Setting Compound Filters, please refer to the link below:
Hope it's useful for you.