This man beat me;
I have a WPF window with two (important for this case) controls, as from the WPF toolkit available in CodePlex; DatePicker and DataGrid.
A CLR object is installed in the DataContext of this window, which has all the information it needs. This CLR object has a large list of data and a method called GetDataForDate (DateTime date), which determines what date we will see the data.
How can I create an ObjectDataProvider (which, I believe, will be the right solution) to which a datagrid can be attached, which provides access to the data returned by GetDataForDate (), called with the selected DatePicker as a parameter?
In other words, I want the user to use the datepicker to select a date, and the grid should automatically update whenever the date changes to display the correct data.
What black magic should I do to achieve something similar, which I think should be a relatively common data binding scenario?
Thanks in advance!
source
share