This is a migrated thread and some comments may be shown as answers.

RadGridview filtering using VirtualQueryableCollectionView

6 Answers 106 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Dipika
Top achievements
Rank 1
Dipika asked on 08 Jan 2013, 05:49 AM
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 :

 

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);

});

}

 

 

 

6 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 08 Jan 2013, 07:37 AM
Hi,

 The working code can be found here. You can check your local copy of our demos for more info.

Greetings,
Vlad
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Dipika
Top achievements
Rank 1
answered on 08 Jan 2013, 09:06 AM
Thanks for reply..
Could you please help me from where I can download this code, because demo contains only example.xaml and example.xaml.cs files. and I have not found any link on that page which provide to download it..

Regards,
Dipika
0
Vlad
Telerik team
answered on 08 Jan 2013, 09:08 AM
Hi,

 You can download our demos from your account.

Greetings,
Vlad
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Dipika
Top achievements
Rank 1
answered on 08 Jan 2013, 09:22 AM
Can you please provide me path to get this? :(


Thanks again,
Dipika
0
Vlad
Telerik team
answered on 08 Jan 2013, 09:24 AM
Hello,

 Here is it:
https://www.telerik.com/login.aspx?returnurl=%2faccount

Kind regards,
Vlad
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Dipika
Top achievements
Rank 1
answered on 09 Jan 2013, 09:29 AM
Hello,
I tried to download code from given link but wont able to do so.
It would be thankful if you provide sample attachement of it over here.


Thanks,
Dipika
Tags
General Discussions
Asked by
Dipika
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Dipika
Top achievements
Rank 1
Share this question
or