Hello,
I am using WPF NetAdvantage 2012.2 (and cannot update to a later version).
I have a xamdatagrid with an UnboundField defined. I need to apply a binding converter to this unbound field and need to pass in the DataItem itself (which seems straighforward) and the DataContext of the grid.
Can I have an example of how to do this? The trouble I am having is with getting access to the DataContext from the Unboundfield.
Thanks.
Hello Torque,
The UnboundField does not derive from FrameworkElement and its DataContext is not initially set. You can try using the following binding for the UnboundField if you would like to get the XamDataGrid’s DataContext
Binding="{Binding Path=Cell.DataPresenter.DataContext, RelativeSource={RelativeSource Self}}"
If you have any questions or concerns on the same do not hesitate to let me know.
Thanks. That binding works when I try to use a regular value converter.
Can you show me an example of a multi binding being used on an unbound field please?
Let's say we have a simple unbound field called "Prices". This field will contain doubles and I want to use a multi value converter, passing in the field's DataItem and the grid's DataContext, to set this field's value.