Hi there
I know I can easily bind *to* a grid's active item by setting a binding using the ActiveRecord.DataItem property. However, how can I do it the other way round? I don't see a converter as a solution: The converter does not have a context (the grid), and this context cannot be assigned through a binding property because that would lead to a circular reference (if I declare it first, the binding fails, if I declare it later, the grid does not see the converter):
<UserControl.Resources> <!-- this binding does not work - the grid has not been created yet --> <conv:ActiveGridRowConverter x:Key="rowConverter" Grid="{Binding ElementName=contactGrid, Mode=OneTime}" /></UserControl.Resources><igDP:XamDataGrid x:Name="contactGrid" DataSource="{Binding Path=ContactStore.Contacts}" ActiveRecord="{Binding Path=ActiveContact.Contact, Converter={StaticResource rowConverter}}" />
I'm not sure whether I'm just overlooking the obvious - what's the recommended solution here?
Thanks,
Philipp
Yes, the article I was looking for. Your article gives me another approach on the subject. I hope to read more articles from you.abcya
Attached is a simple project that shows 2-way binding to ActiveDataItem working.
Hi, this issue is still a problem for me too.
@Joe : could you provide a test solution to see this functionality working ?
I have a same issue. from activeitem to my INotifyPropertyChanged property, it's working (if i click something, my SelectedObject is changed to the clickedvalue). but when my bound object changed, the activeItem didn't change.
All we are doing is exposing a DependencyProperty so yes 2-way binding should work.
In the Output window are you getting any binding error msgs releating to this?
How is your ObjetCourant implemented? Is it a DependencyProperty or just a CLR property? If a CLR property does the class that exposes it implement INotifyPropertyChanged?