This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
I have run into a couple of issues with DataGrid filtering using the header button. I am setting the column.PropertyType for primitive types and DateTime as discussed in my previous thread, and this seems to work fine (other than binding errors described below). Then I modified your Sample Explorer to enable filtering with the header button, and observed that it handles enumerations very nicely. However, when I set the column.PropertyType for enumeration values in my scenario (not actual CLR properties) it shows the proper editor but with an empty set of possible values. Is it possible that this is because the setting column.PropertyType doesn't work for this? If so could this be fixed, or can I provide some additional configuration to get this to work? Secondly, I am seeing binding errors (see below) in the debugger output when filtering. These errors seem to depend on the actual column data type, regardless of the type I specify via column.PropertyType (which I set to typeof(string) for types other then primitives and DateTime). I realize that these error may well not indicate a real problem, but I fond them annoying at best. Is there any way to get rid of them? I am using the latest nightly build. Thanks Peter System.Windows.Data Error: 40 : BindingExpression path error: 'MatchCase' property not found on 'object' ''ComparableFilterDescription' (HashCode=37934587)'. BindingExpression:Path=Description.MatchCase; DataItem='ColumnFilter' (HashCode=13432325); target element is 'ToggleButton' (Name=''); target property is 'IsChecked' (type 'Nullable`1') System.Windows.Data Error: 40 : BindingExpression path error: 'MatchCase' property not found on 'object' ''ObjectFilterDescription' (HashCode=47950703)'. BindingExpression:Path=Description.MatchCase; DataItem='ColumnFilter' (HashCode=24368036); target element is 'ToggleButton' (Name=''); target property is 'IsChecked' (type 'Nullable`1') System.Windows.Data Error: 40 : BindingExpression path error: 'FirstValue' property not found on 'object' ''ObjectFilterDescription' (HashCode=47950703)'. BindingExpression:Path=Description.FirstValue; DataItem='ColumnFilter' (HashCode=24368036); target element is 'TextBox' (Name=''); target property is 'Text' (type 'String') System.Windows.Data Error: 40 : BindingExpression path error: 'MatchCase' property not found on 'object' ''ComparableFilterDescription' (HashCode=36418761)'. BindingExpression:Path=Description.MatchCase; DataItem='ColumnFilter' (HashCode=49292057); target element is 'ToggleButton' (Name=''); target property is 'IsChecked' (type 'Nullable`1') System.Windows.Data Error: 40 : BindingExpression path error: 'MatchCase' property not found on 'object' ''ComparableFilterDescription' (HashCode=14562298)'. BindingExpression:Path=Description.MatchCase; DataItem='ColumnFilter' (HashCode=16089313); target element is 'ToggleButton' (Name=''); target property is 'IsChecked' (type 'Nullable`1') |
|
|
Hi Peter, Thanks for pointing these out. In the next nightly build, both of these will be solved - The binding errors have been fixed, and the enum filter editor will be able to get the possible values from the enum type that you provide to the PropertyType property. Let me know how that goes for you. -Jason Fauchelle |
|
|
Hi Jason, It now works as expected with enums, and no binding errors! Thanks Peter |
|