Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
80
Passing filtered rows (XamDataGrid) to viewModel
posted

I'm trying to avoid using code behind, and implementing all the logic in the viewModels. 

I added the following markup to my XamdataGrid

<i:EventTrigger EventName="RecordsInViewChanged">
                        <commands:EventToCommand Command="{Binding Path=RecordsInViewChangedCommand}" PassEventArgsToCommand="True"/>
                        </i:EventTrigger>

and implemented RecordsInViewChangedCommand (just a stub, without any logic yet).

But now I get the following exception on the window initialization:

System.InvalidOperationException
HResult=0x80131509
Message=Can't set the DataSource on a DataPresenter that has items added explicitly through the DataItems collection.
Source=InfragisticsWPF4.DataPresenter.v17.1
............
StackTrace:
at Infragistics.Windows.DataPresenter.DataPresenterBase.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
at Infragistics.Windows.DataPresenter.XamDataGrid.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
.....
.............
at DocAuto.ServerAdmin.WPF.ViewModels.PermissionsManagementViewModel.set_SelectedItemWrapper(TabItemWrapper value) in C:\...



Parents Reply Children
No Data