I wanted to add a Filter functionality to this Control.

Sep 25, 2007 at 8:15 PM
I wanted to add a Filter functionality to this Control.

I have added a Filter String to the Column and a Circle that is Drawn when the Column has a Filter.

Now I wanted to Filter tha Rows, so only Rows wich the Filter allows are returned.

What would be the best way to implement this? I thought i change the ItemList, so only Items wich are correct to the Filter are returned. Can i read the columns settings from within the item list, so i can check if a entry fits the filter?
Coordinator
Sep 26, 2007 at 5:51 PM
I think the easiest way would be to perhaps create a user control and wrap your filtering extras around the Superlist control making Superlist private inside your control. Thereby exposing only what you want to the outside world. It's the sort of thing where I would create my own derived Sections for the relevant overrides I need to do and plug them in using a SectionFactory. So for example I would create my own FilterColumn (maybe derived from Column) list exposed on my UserControl which the users could add an remove etc. Then when changes to the filters are detected I would delete the SuperList row contents and re-add based on whatever filtering mechanism you have in place. If a FilterColumn is added / removed then I would pass the change down into the Superlists Columns list.

Hope this makes sense :-)

Cheers
Lee