iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
I wonder how I can implement ISupportRefresh because I followed the documentation (http://developer.intersoftsolutions.com/display/crosslight/Displaying+Data#DisplayingData-ImplementingIncrementalLoading), but could not implement the HasMoreItems and also could not implement the limit data,, someone could help me how I can do this.
Follow my ViewModel and my controller.
my viewmodel
public class PersonListViewModel:ListViewModelBase<Person>, ISupportIncrementalLoading, ISupportRefresh { private bool _isDataLoading; private bool _enableIncrementalLoading; private bool _enableIncrementalRefresh; private bool _enableRefresh; WebApi rest; public PersonListViewModel() { rest = new WebApi(); this.EnableIncrementalLoading = true; this.EnableAsyncFilter = true; this.EnableRefresh = true; LoadDataIncremental(); } public bool EnableIncrementalLoading { get { return _enableIncrementalLoading; } set { if (_enableIncrementalLoading != value) { _enableIncrementalLoading = value; OnPropertyChanged("EnableIncrementalLoading"); } } } public bool IsDataLoading { get { return _isDataLoading; } set { if (_isDataLoading != value) { _isDataLoading = value; OnPropertyChanged("IsDataLoading"); } } } public async void LoadDataIncremental() { this.IsDataLoading = true; this.SourceItems = await rest.GetPersons(); this.IsDataLoading = false; } public bool EnableIncrementalRefresh { get { return _enableIncrementalRefresh; } set { if (_enableIncrementalRefresh != value) { _enableIncrementalRefresh = value; OnPropertyChanged("EnableIncrementalRefresh"); } } } public bool EnableRefresh { get { return _enableRefresh; } set { if (_enableRefresh != value) { _enableRefresh = value; OnPropertyChanged("EnableRefresh"); } } } public bool HasMoreItems { get { throw new NotImplementedException(); } } public async void RefreshData() { this.IsDataLoading = true; this.SourceItems = await rest.GetPersons(); this.IsDataLoading = false; } protected override void ExecuteRefresh(object parameter) { base.ExecuteRefresh(parameter); this.RefreshData(); } }
my controller
public class PersonsController : ApiController { private DBEntities db = new DBEntities(); // GET: api/Persons public IQueryable<Person> GetPersons() { return db.Persons.Take(20); } }
Sorry for the delay in sending this.
I’m currently still investigating this issue and need more time to provide you with solution, suggestion, or sample.
I’ll get back to you as soon as possible.
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname