We assign a xamDataGrid data source a binding list which implements ICollectionView, and set
xamdataGrid's IsSynchronizedWithCurrentItem = true, the currentItem can synchronize with the active
record in grid, but the currentPosition is not visual index synchronize with grid show. How can I get
visual index through collection view?
Thanks.
Hello,
Can you please give us more details on your scenario and what you are trying to achieve with the Visible index of a record? The ActiveRecord property is synchronized with the CurrentItem of the ICollectionView.
Hi,
I am doing a MoveUp/Down control that can be used to move one selected row in xamDataGrid position up or down, I want this control can be "control neutral", so it can also been used to wpf controls like ListBox, ItemsControl; So I want to do this operation in Collection View.
In wpf controls like ListBox, ItemsControls, their view model is CollectionView, which can synchronize the CurrentItem and CurrentPosition with selected item showed in screen, (setting IsSynchronizedWithCurrentItem=true) ; especially , CurrentPosition is the index of current item showed in screen, it is the visible index, not the index of current item stored in data source backend.
Now I set a binding list which implements ICollectionView to XamDataGrid data source, the collection view is this binding list, I set "IsSynchronizedWithCurrentItem=true", yes, the CurrentItem can synchronize with the active record showed in screen, but CurrentPosition don't synchronize with the visible index;
e.g. if you try to sort the grid (by clicking in the column caption), the data in BindingList which implements ICollectionView doesn’t change, but the records on the grid change (different sorting same data); it seems that the XamDataGrid (the control) keeps its own indexing.
To one word, how the binding list which implements the ICollectionView as data source for XamDataGrid can be fully synchronize with XamDataGrid's view ?