I am attempting to bind a ListView
control to a DataTable
, but the WPF binding system seems to be complaining about the binding path I specify.
As an example, a GridViewColumn
is defined as follows:
<GridViewColumn Header="ColumnTitle" DisplayMemberBinding="{Binding Path=/, Converter={StaticResource myConverter}}"/>
As far as I understand (and MSN seems to support me), specifying Path=/
should make the binding on the current item of the data collection.
The error I receive (in the trace window) is:
System.Windows.Data Error: 39 : BindingExpression path error: '' property not found on 'current item of collection' ''OrdersRow' (HashCode=680171)'. BindingExpression:Path=/; DataItem='OrdersRow' (HashCode=680171); target element is 'TextBlock' (Name=''); target property is 'Text' (type 'String')
This is giving me the impression that /
isn't even a valid path, and WPF is expecting something after the slash. If so, how else would I bind to the current item? Why am I getting this error in the first place?