Hi Guys,
I am very interested with Data virtualization, so I am refractoring my customer's old WPF project. Everything goes well but I encountered one critical issue when I use combobox with VirtualQueryableCollectionView as GridViewDataColumn.CellEditTemplate. Let me show it:
1. I make below collection binding to my combobox
3. when I change inner combobox's selection, my viewmodel BuyingOrganization can be changed. From surface,
it work right. But if I take this cell out of Edit mode, the Null will be set to this BuyingOrganization.
I debug it, the VirtualQueryableCollectionView will call MoveCurrentPosition to one null value.
How should I do? Can you give me some tips?
Thanks & Regards
Dely
I am very interested with Data virtualization, so I am refractoring my customer's old WPF project. Everything goes well but I encountered one critical issue when I use combobox with VirtualQueryableCollectionView as GridViewDataColumn.CellEditTemplate. Let me show it:
1. I make below collection binding to my combobox
private VirtualQueryableCollectionView _dataSource;public VirtualQueryableCollectionView DataSource{ get { if (_dataSource == null) { _dataSource = new VirtualQueryableCollectionView(Manager.GetAll().AsQueryable() .OrderBy(ExpressionHelper.CreateOrderByExpression<T>(DisplayName))) { LoadSize = 20, VirtualItemCount = _manager.GetCount(), }; //_dataSource.ItemsLoading += ItemsLoading; //_dataSource.ItemsLoaded += ItemsLoaded; } return _dataSource; } set { if (Equals(_dataSource, value)) return; _dataSource = value; OnPropertyChanged("DataSource"); }}
2. I used GridViewDataColumn.CellEditTemplate with below
<telerik:GridViewDataColumn Header="{common:Translate RetailChain}"
x:Name="Test"
DataMemberBinding="{Binding BuyingOrganization.BO_CompanyName}">
<telerik:GridViewDataColumn.CellEditTemplate>
<DataTemplate>
<telerik:RadComboBox ToolTip="{common:Translate RetailChain_TT}"
SelectedValue="{Binding BuyingOrganization}"
ItemsSource="{Binding Source={StaticResource GlobalDataManager},Path= BuyingOrganizations.DataSource}"
DisplayMemberPath="{Binding Source={StaticResource GlobalDataManager},Path= BuyingOrganizations.DisplayName}" />
</DataTemplate>
</telerik:GridViewDataColumn.CellEditTemplate>
</telerik:GridViewDataColumn>
it work right. But if I take this cell out of Edit mode, the Null will be set to this BuyingOrganization.
I debug it, the VirtualQueryableCollectionView will call MoveCurrentPosition to one null value.
How should I do? Can you give me some tips?
Thanks & Regards
Dely