I'm trying to implement a filtering option on the WPF Datagrid control. Something like, if the user click on an arrow button on the column header he would be presented with a context menu from where he can choose the filtering options
(A filter view would appear).
My problem now is the context menu (Filter view) works and appears when i implement it in a WPF Desktop application but the same code does not work in an XBAP applicaiton even with full trust. I then tried to debug it further by opening the
Visual Studio Output window and it gave me the following error whenever i tried to show a context menu when I click on the datagrid column header.
A first chance exception of type 'System.ComponentModel.Win32Exception' occurred in WindowsBase.dll
System.Windows.Data Error: 8 : Cannot save value from target back to source. BindingExpression:Path=DropDown.IsOpen; DataItem='DropDownButton' (Name='PART_DropDown'); target element is 'DropDownButton' (Name='PART_DropDown'); target property is 'IsChecked'
(type 'Nullable`1') Win32Exception:'System.ComponentModel.Win32Exception: Cannot create a top-level child window
Can anybody help me here?