Hello,
I am using VirtualQueryCollectionView as on every scroll I am calling sevice to get data through its ItemLoading event.
I want to use filter property of grid view to filter the data. I have seen many forum where they have used RIA service along with VirtualQuerableCollection. I tried to bind similar to that but it wont work.
Can anybody help me to filter the data when we are using MVVM and VirtualQuerable Collection along with it ?
Please find following code I am using :
I am using VirtualQueryCollectionView as on every scroll I am calling sevice to get data through its ItemLoading event.
I want to use filter property of grid view to filter the data. I have seen many forum where they have used RIA service along with VirtualQuerableCollection. I tried to bind similar to that but it wont work.
Can anybody help me to filter the data when we are using MVVM and VirtualQuerable Collection along with it ?
Please find following code I am using :
private void InitDataSource()
{
EventLogEntries = new VirtualQueryableCollectionView<Event> { LoadSize = 100 };
EventLogEntries.ItemsLoading += (s, e) => Load();
}private void Load()
{
Repository.ServiceCall(input1,SetEventLogEntries);
}
private void SetEventLogEntries(IPage<Event> eventLogEntries)
{
UseDispatcher(() =>{
if (EventLogEntries.FilterDescriptors.Count > 0)
{
var temp = eventLogEntries.Items.AsQueryable().Where(EventLogEntries.FilterDescriptors).ToIList();
EventLogEntries.Load(0, temp);
}
else
{
EventLogEntries.Load((eventLogEntries.PageNumber - 1) * ModuleConstants.LOGPAGESIZE, eventLogEntries.Items);
}
NotifyPropertyChanged(() => EventLogEntries);
});
}