Much like iTunes users, financial analysts will probably not be interested in looking at all the records all the time, so we need some filter/search mechanism.
A real application would allow the analyst to pick specific sets of papers to look at, and probably to save these views and switch between them. Our sample takes a simpler approach by re-using the SearchBox control described above. Instead of selecting specific entries, our users will type something like “bank” or “electric” in the search box to filter the data.
Hooking up our SearchBox control to the financial data source is easy:
// create data source
FinancialDataList list = FinancialData.GetFinancialData();
var view = new PagedCollectionView(list);
// bind data source to the grid
_flexFinancial.ItemsSource = view;
// hook up the SearchBox (user can search by company name or symbol)
_srchBox.View = view;
var props = _srchCompanies.FilterProperties;
props.Add(typeof(FinancialData).GetProperty("Name"));
props.Add(typeof(FinancialData).GetProperty("Symbol"));