How to use pagination and filter on Endpoints WebService?

  • 5 November 2014
  • 1 reply
  • 1 view

Badge

Hello,

 

I'm trying to create a web service as a datasource for my SmartForm project. It provides GetAll method which return all rows found in the actual datasource (the actual datasource just provides me a function to get data, so I can't directly connect it using existing ServiceBrokers). I've successfully created a SmartObject from the web service and it properly worked with ListView to show all records.

 

Here is an example code of GetAll method:

[WebMethod]
public Employee[] GetAll()
{
EmployeeService service = new EmployeeService();
return service.GetAll().ToArray();
}

 

 

 

However, some entites such as Employee, has more than 700 records. It may not practical to return all records for every request. In this case, the built-in pagination and filter of ListView doesn't reduce the overhead as it apply filters and pagination after all records have been retrieved from the web service. I'd like to modify the web service to support pagination and filter that was triggered on the ListView. Any ideas on the solution for this?

 

Thanks,

 


1 reply

Userlevel 3
Badge +10

How are you looking to separate the data, and what kind of control are you looking to use when you call GetAll?  I.e., do you want to split up the results into multiple drop-downs, or are you looking to use the picker control with better performance?

Reply