PDA

View Full Version : How to filter a list?


bugman_2000
02-01-2007, 04:50 AM
Hi,

I'm really struggling with databinding. I'm not even quite sure what terms to be using here.

I know how to iterate through a datapath and display data in rows. I would like to filter this list according to some attribute(s), for example to output a list of phonebook entries for "Smith" only.

The South Park example in the docs shows how to write selected entries to the debugger using a do/while loop, but I cannot figure out how to incorporate this into the automatic iteration through the datapath. I actually *can* output the "Smiths" to the debugger, but that's not where I want them. I want them in a table of views, and I obviously don't want a bunch of empty views in between. So filtering the entries from within the automatic datapath iteration does not seem to be an option. I don't know how to create views within a do/while loop, or if I can even do that.

I hope I was able to explain this clearly enough. Any suggestions would be gratefully appreciated.

Tony

notzippy
02-01-2007, 07:33 AM
Have you tried readinf the documentation on xpath (Software Developer guide chapter 33) ? You can use the filtering technique in a datapath for a view..

bugman_2000
02-01-2007, 03:28 PM
I'll take a look. Thanks very much.