Hi,
I´m trying to syncrhonize the items in the grid. I have seen the example you posted in
http://devcenter.infragistics.com/Support/KnowledgeBaseArticle.aspx?ArticleID=10114
The issue is that when you try to syncrhonize the grid from the view, the ActivatedRecord is fired and then the grid syncrhonizes two times.
I have created a subclass of XamDataGrid. How can I override the events in a method or how can I override the method? Of course how can I return it to the default?
Thanks.
The issue is that I have created a subclass of the XamdataGrid in order to two way synchonize the ActiveRecord with the underlaying views CurrentItem.
It almost works. When I load data to the grid in the Windows_Loaded method it works fine.
There is one case where it doesn´t work. When I load data as a user request. If the windows is already loaded, opened and activated and the data is requested from an user action, then it doesn,t work.
The issue is that I want to cretae an event for the dataview in this way:
// Fileds
Private ICollectionView view;
//Constructor
subclass XamdataGrid()
this.view.ViewCollectionChanged += EventHandler(............................)
It doesn´t work because the view is null even if I got the default view from the DataSource.
Is there anyway to sucribe somewhere an event that keeps track if the DataSource Collection is Cahnged.
Some help will be appreciated!!
Thanks in advance
P.D. Will the new 10.2 Release support Two Way Synchronization for the DataPresenter family.
Hello,
This feature is supprted with the 9.2 volume release. We have exposed IsSynchronizedWithCurrentItem property on the XamDataPresenter family classes. Any later version will support this either.
Then, there will be some error because it doesn´t work with BindingList collections. I thinck that you should be aware of this problem and will cdorrect it soon.
Thanks, Alex
For now you could set the DataSource to a CollectionView that wraps your collection. E.g. this.dp.DataSource = CollectionViewSource.GetDefaultView(yourBindingList)
OK, but other Grids derived from a Selector class like the DataGrid in the WPF Toolkit whenever IsSynchronizedWithCurrentItem is set to true it synchronizes even if the list is a BindingList.
So it would be a nice feature the support for BindingList Collections.
Thanks,
IsSynchronized property works only with collections that implement ICollectionView which expose CurrentItem property. If you are trying to use it with BindingList it would not work. You can see more information here.