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
Hi,
As the subject states, we need to enable Searching on a selection of a Category. Considering a list of categories can be quite long, how can we enable searching to limit the list?
Hi Domingo.
To implement searching, you need to provide a custom view controller for the selection list.
[ImportBinding(typeof(CategoryListBindingProvider))][RegisterNavigation(DeviceKind.Phone)][Register("CategoryListViewController")]public partial class CategoryListViewContoller : UITableViewController<CategoryListViewModel> { public CategoryListViewContoller() : base("CategoryListView", null) { } protected override void InitializeView() { base.InitializeView(); this.RegisterViewIdentifier("SearchTableView", this.SearchDisplayController.SearchResultsTableView); } public override bool AllowSearching { get { return true; } } public override ChoiceInputMode ChoiceInputMode { get { return ChoiceInputMode.Single; } } public override TableViewInteraction InteractionMode { get { return TableViewInteraction.ChoiceInput; } } }
And don't forget to specify some properties for SelectionInput attribute in your form metadata, such as ReuseExistingViewContext and NavigationTargetIdentifier. It will ensure the form builder to use your view controller, instead the default one.
[SelectionInput(SelectionMode.Single, DisplayMemberPath = "Name", ListSourceType = typeof(CategoryListViewModel), ReuseExistingViewContext = true, NavigationTargetIdentifier="CategoryListViewController")] public static string Category;
Hope this helps. You also can get the sample for this scenario from here: http://git.intersoftpt.com/projects/CROS-SUPP/repos/enable-searching-in-selection-form/browse.
Feel free to discuss it further if you have any other thought.
Kind Regards,
We didn't seem to get a sample of this for Android. If you think about it... how is this implemented in a cross-platform manner when the NavigationTargetIdentifier used in the metadata is of iOS? Please advise.
Hi Jimmy,Android have different implementation and simple workaround would not work, but i already inform this to our developer under CROS-888. As usual please do ask me about the progress of this issue.Best Regards,Arief
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