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
Awesome! Hey Arief, I'm not sure if you noticed, that when the list is loaded the first time you set focus in a textbox for quantity (based on your samples) the keyboard popups for a split second and the focus from the textbox is lost. In return you need to click the textbox again to bring the keyboard back up. Please confirm and advise how we can fix it... Thanks!
Okay, I think this may be related to the emulator.
using System;using System.Collections.Generic; using System.Linq; using Intersoft.AppFramework; using Intersoft.AppFramework.Identity; using Intersoft.AppFramework.Models; using Intersoft.AppFramework.ViewModels; using Intersoft.Crosslight; using Intersoft.Crosslight.Input; using Intersoft.Crosslight.RestClient; using Mercury.Domain.Data; using Mercury.Mobile.Core.Models.EventAggregators; using Mercury.Mobile.Core.Models.QueryDefinitions; using Mercury.Mobile.Core.Services; using Mercury.Mobile.Common.Extensions; namespace Mercury.Mobile.Core.ViewModels.Collection { public sealed class LocationListViewModel : DataListViewModelBase<Location, ILocationRepository> { #region Field Variables private IQueryDefinition f_FilterQueryDefinition; private IQueryDefinition f_ViewQueryDefinition; private User f_User; #endregion #region Constructors public LocationListViewModel() { // Configure data behaviors. this.EnableRefresh = true; this.EnableAsyncFilter = true; this.ExitEditModeOnDelete = true; this.EnableIncrementalRefresh = true; // Enable incremental loading. this.EnableIncrementalLoading = true; this.IncrementalLoadingSize = 20; // Customize the service descriptor. this.ServiceDescriptor = new ServiceDescriptor(); this.ServiceDescriptor.Parameters.Add("userName", this.User.UserName); this.ServiceDescriptor.ServiceName = "LocationsByUser"; this.ServiceDescriptor.HttpMethod = HttpMethod.GET; // Commands. this.LoadIncrementalCommand = new DelegateCommand(this.ExecuteLoadIncremental, this.CanExecuteLoadIncremental); this.CancelCommand = new DelegateCommand(this.ExecuteCancel); this.DoneCommand = new DelegateCommand(this.ExecuteDone); } #endregion #region Commands public DelegateCommand LoadIncrementalCommand { get; set; } public DelegateCommand CancelCommand { get; set; } public DelegateCommand DoneCommand { get; set; } #endregion #region Properties /// <summary> /// Gets the filter query. /// </summary> /// <value>The filter query.</value> protected override IQueryDefinition FilterQuery { get { if (this.f_FilterQueryDefinition == null) this.f_FilterQueryDefinition = new LocationQueryDefinition(); return this.f_FilterQueryDefinition; } } /// <summary> /// Gets the view query. /// </summary> /// <value>The view query.</value> protected override IQueryDefinition ViewQuery { get { if (this.f_ViewQueryDefinition == null) this.f_ViewQueryDefinition = new LocationQueryDefinition(); return this.f_ViewQueryDefinition; } } /// <summary> /// Gets the user. /// </summary> /// <value>The user.</value> public User User { get { if (this.f_User == null) this.f_User = this.GetService<IUserService>().GetCurrentUser(); return this.f_User; } } #endregion #region Methods private bool CanExecuteLoadIncremental(object paramater) { return this.EnableIncrementalLoading; } private void ExecuteLoadIncremental(object parameter) { this.LoadDataIncremental(); } private void ExecuteCancel(object parameter) { this.NavigationService.Close(new NavigationResult(NavigationResultAction.Cancel)); } private void ExecuteDone(object parameter) { this.NavigationService.Close(new NavigationResult(NavigationResultAction.Done)); } #endregion #region Action Methods protected override void OnDataOperationFailed(Exception exception, DataAction action) { base.OnDataOperationFailed(exception, action); // This is only added to display the stacktrace on release. this.MessagePresenter.Show(exception.StackTrace); } #endregion } }
Hi Arief,
That's what we're trying to confirm. How does the form builder handle numeric values? Can we apply the same approach when binding to a custom listview item like the one we're trying to accomplish here? Cause right now it only works on string values in which case that is not our goal in this scenario. We need to bind that text field to a nullable numeric value such as int?, decimal?, and/or double?. Here's the layout:
<EditText android:id="@+id/NewRead" android:inputType="number" android:textAppearance="?android:attr/textAppearanceMedium" android:layout_width="fill_parent" android:layout_height="match_parent" android:gravity="right" android:numeric="integer" android:singleLine="true" />
Please lemme know if there's something wrong with this layout. And here's the binding code from the BindingProvider:
p_ItemBinding.AddBinding("NewRead", BindableProperties.TextProperty, new BindingDescription("NewValue", BindingMode.TwoWay, UpdateSourceTrigger.PropertyChanged));
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